1. Morgan collects stuffed animals, and she has 6 cows and 7 sheep. How many stuffed animals does she have? Here's how I did it:
Dim cows, sheep, total As Double
cows = 6
sheep = 7
total = cows + sheep
MessageBox.Show(total)
2. Diane bought 7 mega burgers. Each mega burger cost $4. How many dollars did she spend on the mega burgers?
Dim bAmount, bCost, total As Integer
bAmount = 7
bCost = 4
total = bAmount * bCost
MessageBox.Show("The cost of burgers is " & FormatCurrency(total))
3. Ole has 15 apples and 12 oranges. How many pieces of fruit does he have?
Dim apples, oranges, total As Double
apples = 15
oranges = 12
total = apples + oranges
MessageBox.Show("He has " & total & " pieces of fruit.")
No comments:
Post a Comment