Skip to content

Latest commit

 

History

History

09-paint-calculator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Bash Logo

Paint Calculator

Sometimes you have to round up to the next number rather than follow standard rounding rules.

Calculate gallons of paint needed to paint the ceiling of a room. Prompt for the length and width, and assume one gallon covers 350 square feet. Display the number of gallons needed to paint the ceiling as a whole number.

Example Output

   [$] Paint Calculator
 
 What is the length of the room? 36
 What is the width of the room? 10

    You will need to purchase 2 gallons
    of paint to cover 360 square feet.

Constraints

  • Use a constant to hold the conversion rate.
  • Ensure that you round up to the next whole number.