Let's quickly recap what we did previously.
Engagement Message
Shall we dive in?
So previously, we saw how to add values stored in variables, like:
let total_score = score1 + score2;
Engagement Message
If score1
was 50 and score2
was 25, what value ended up in total_score
?
Great! Besides adding (+
), Rust can also do subtraction using the minus sign (-
).
If you have:
Engagement Message
What value do you think remaining_coins
holds?
Rust uses the asterisk (*
) for multiplication. It works just like you'd expect.
Example:
Engagement Message
How many total_apples
would there be?
