zig/test/cases/conditions.3.zig

17 lines
232 B
Zig
Raw Normal View History

2022-04-27 21:59:55 +01:00
pub fn main() u8 {
var i: u8 = 11;
if (i < @as(u8, 4)) {
i += 10;
} else {
if (i > @as(u8, 10)) {
i += 20;
} else {
i = 20;
}
}
return i - 31;
}
// run
//