Answer to Question #235961 in C++ for noone

Question #235961

A moving contractor wants you to write a program that he can use to estimate the cost

of moving a residential customer. The charge for moving is based on two factors.

First, the labor cost is estimated by charging $4.00 for every 100 pounds of furniture to

be moved.

Second, the travel charge is $50.00 plus $1.75 for each mile the furniture is to be moved.

The program should prompt the user for the estimated weight of the furniture and the

distance the furniture is to be moved.

Finally, the program should display the labor charge, the travel charge, and the total

charge.



1
Expert's answer
2021-09-11T14:25:21-0400
#include<iostream>
using namespace std;
int main()
{
	int x,y;
	cout<<"Enter the estimated weight of the furniture: ";
	cin>>x;
	cout<<"Enter the distance the furniture is to be moved: ";
	cin>>y;
	float c1=(x/100)*4.00;
	float c2=(50.00+1.75)*y;
	float total_cost=c1+c2;
	cout<<"Labour charge is: $"<<c1<<endl;;
	cout<<"Travel charge is: $"<<c2<<endl;
	cout<<"The total cost is: $"<<total_cost;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS