gallons = roundup(cones/24)
gallons
, and cones
as places to store information.
< | less than |
> | greater than |
== | equal |
<= | less than or equal |
>= | greater than or equal |
!= | not equal |
if
or if else
statements.
get age if age <= 5 calculate the discount by multiplying the price by 10% discount = itemPrice * .1 else the discount is 0 discount = 0
If the age is five or less compute the discount by multiplying the price by 10%, otherwise there is no discount.
for each person getting a cone get the age if age <= 5 set the discount to be 10% of the cost. else set the discount to be 0 cost = price - discount total = total + cost print the total
while there is another person getting a cone get the age if age <= 5 set the discount to be 10% of the cost. else set the discount to be 0 cost = price - discount total = total + cost print the total