zig/test/cases/while_loops.1.zig

12 lines
145 B
Zig
Raw Normal View History

2022-04-27 21:59:55 +01:00
pub fn main() u8 {
var i: u8 = 0;
while (i < @as(u8, 10)) {
var x: u8 = 1;
i += x;
}
return i - 10;
}
// run
//