if ( temperature > 98.6 ) fever = true ;
2. Write a conditional that assigns 10,000 to the variable bonus if the value of the variable goodsSold is greater than 500,000 .
if ( goodsSold > 500000 ) bonus = 10000 ;
3. Write a conditional that decreases the variable shelfLife by 4 if the variable outsideTemperature is greater than 90 .
if ( outsideTemperature > 90 ) shelfLife = shelfLife - 4 ;
4. Write a conditional that multiplies the values of the variable pay by one-and-a-half if the value of the boolean variable workedOvertime is true.
if ( workedOvertime == true ) pay = pay * 1.5 ;
No comments:
Post a Comment