feat: add while loops, break and continue statements

This commit is contained in:
2026-04-21 23:53:41 +02:00
parent 68ec14e541
commit 92eefb5cf1
10 changed files with 397 additions and 9 deletions
+15
View File
@@ -0,0 +1,15 @@
fn main() -> i32 {
let n = 10;
let a = 0;
let b = 1;
let i = 0;
while i < n {
let temp = a + b;
a = b;
b = temp;
i = i + 1;
}
return a;
}