CAP/MiniC/TP04/tests/students/base/test_nested_while.c
2024-10-21 23:10:10 +02:00

26 lines
287 B
C

#include "printlib.h"
int main() {
int x, y, z;
while (x < 12) {
while (x < 25) {
x = x+2;
}
}
println_int(x);
x = 0;
while (x < 5) {
x = x+1;
y = y+x;
while (z < 3) {
z = z+y;
}
}
println_int(z);
return 0;
}
// EXPECTED
// 26
// 3