We need a program ( C++) that will calculate the cost of a room of flooring. Thi
ID: 3876719 • Letter: W
Question
We need a program ( C++) that will calculate the cost of a room of flooring. This program will be as if the sales person is entering in the data. The program will need to calculate the total cost of putting flooring down for just one room. We are a small store so the sales person knows the price of all flooring sold. The measurements of the room will have already been taken. There is a standard 1 room installation charge of $100. Also all flooring has some type of under layer that needs to be purchased. The output should give a breakdown of the cost for the flooring of that one room.
Explanation / Answer
#include <iostream.h>
int main()
{ int total_cost,flooring_cost_per_unit_area,under_layer_cost_per_unit_area,length,breadth;
cout<<"Enter length and breadth of floor"<<endl;
cin>>length>>breadth;
total_cost=100+(length*breadth)*(flooring_cost_per_unit_area+under_layer_cost_per_unit_area);
cout<<"Total cost will be"<<total_cost<<endl;
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.