Wallpaper Rolls



Wallpaper Rolls

Program Specification:

Wallpaper comes in two basic thicknesses, .25mm and .15 mm and two basic categories, solid and patterned. The patterned wallpaper is $2.00 more expensive per single roll. The sales clerk will provide the length, width, and ceiling height of the room, in feet. He or she will also provide the number of square feet a single roll will cover. Create a program that calculates and displays the number of single rolls of wallpaper needed to cover a room.

Sample Calculations:

Room size: 10 feet by 12 feet, with a ceiling height of 12 feet.

Single roll coverage: 30 square feet.

1. Calculate the perimeter of the room by adding together its length and width, and then multiplying the sum by 2:

(10 ft + 12 ft) * 2 = 44 feet

2. Calculate the wall area by multiplying the room’s perimeter by its height:

44 ft * 8 ft = 352 sq ft

3. Calculate the required number of single rolls by dividing the wall area by the number of square feet a single roll provides:

352 sq ft / 30 sq ft = 11.73 (rounded to two decimal places, or approximately 12 single rolls

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download