ethos/tests/loop.ethlang
sfja d2a49f3be0
All checks were successful
Check / Explore-Gitea-Actions (push) Successful in 17s
add while stmt
2026-03-17 12:44:35 +01:00

23 lines
232 B
Plaintext

// expect: 3
// expect: 8
fn main()
{
let a = 0;
while a < 3 {
a = a + 1;
}
print_int(a);
while a < 10 {
if a >= 8 {
break;
}
a = a + 1;
}
print_int(a);
}