Add solutions
This commit is contained in:
parent
7417f01d5d
commit
b056b6ad81
96 changed files with 229 additions and 166 deletions
|
|
@ -10,7 +10,7 @@ pub fn main() void {
|
|||
|
||||
// Please use an if...else expression to set "price".
|
||||
// If discount is true, the price should be $17, otherwise $20:
|
||||
const price: u8 = if ???;
|
||||
const price: u8 = if (discount) 17 else 20;
|
||||
|
||||
std.debug.print("With the discount, the price is ${}.\n", .{price});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue