Answer to Question #292530 in C++ for Ash

Question #292530

Please help me determine the C++ code for the following:


The dealer's cost of a car is 85% of the listed price. The dealer would accept any offer that is at least $500 over the dealer's cost. Design an algorithm that prompts the user to input the list price of the car and print the least amount that the dealer would accept for the car.

1
Expert's answer
2022-01-31T14:21:21-0500
#include <iostream>
using namespace std;


int main(){
	float list_price;
	cout<<"Please enter the list price of the car: ";
	cin>>list_price;
	float dealers_cost = list_price * 0.85;
	float min_accepted_price = dealers_cost + 500;
	cout<<"The least amount that the dealer would accept for the car: "<<min_accepted_price<<"\n\n";


	system("pause");
	return 0;
}

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