zig/test/cases/conditions.1.zig

13 lines
146 B
Zig
Raw Normal View History

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