mirror of
https://codeberg.org/ziglings/exercises.git
synced 2024-12-27 01:46:29 +00:00
ex10 - missing type was confusing and tangential (#12)
This commit is contained in:
parent
7023b5345c
commit
ee8fbbd65d
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ pub fn main() void {
|
||||||
|
|
||||||
// Please use an if...else expression to set "price".
|
// Please use an if...else expression to set "price".
|
||||||
// If discount is true, the price should be $17, otherwise $20:
|
// If discount is true, the price should be $17, otherwise $20:
|
||||||
var price = if ???;
|
var price: u8 = if ???;
|
||||||
|
|
||||||
std.debug.print("With the discount, the price is ${}.\n", .{price});
|
std.debug.print("With the discount, the price is ${}.\n", .{price});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue