CSCI101 Assign 2

CSCI101 Assign 2 - /*ID block -+ + Programmer : * + +...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/*ID block ----------------------------+ + Programmer : ************ + + Course : Computer Science 101+ + Assignment #2 + + Due Date : 28 January 2007 + +------------------------------------------*/ /* Program statement * This program will calculate the cost of carpeting a rectangular room ******************* Algorithm ************************* Step 1 Input Prompt User for Customer’s Name (string) First name Last name Prompt User for measurements of the room (in feet) – (float) Length Width Prompt User for the price of the carpet (float) Red Carpet Brown Carpet Prompt User for cost of installation (per square foot)- (float) Prompt User for man-hours necessary for installation- (float) Prompt User for pay rate of workers- (float) Set Sales Tax Rate to 7.75% (const float) Step 2 Process Area_Brwn = (Length – 2) * (Width – 2) Area_Red = (Length * Width) – Area_Brwn Total_Area = Width * Length Insul_Total_Cost = Total_Area * Insul_Cost Total_Cost_Brwn = Area_Brwn * Cost_Brwn Total_Cost_Red = Area_Red * Cost_Red Initial_Cost = Total_Cost_Brwn + Total_Cost_Red + Insul_Total_Cost Install_Total_Cost = Man_Hours * Pay_Rate
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

CSCI101 Assign 2 - /*ID block -+ + Programmer : * + +...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online