Answer to Question #224542 in C++ for Nkululeko

Question #224542

Suppose you work for an employer that sells vehicles and your employer instructs you to design a program using the C++ language to determine the car that corresponds to the price that your program calculated. The price of the car is determined by adding three(3) prices: which are engine price, colour price and the price based on the colour of the car


1
Expert's answer
2021-08-09T02:34:53-0400
#include <iostream>
#include <string>


using namespace std;

int main(){
	float price;
	float totalPrice=0;
	cout<<"Enter the engine price of the car: ";
	cin>>price;
	totalPrice+=price;
	cout<<"Enter the colour price of the car: ";
	cin>>price;
	totalPrice+=price;
	cout<<"Enter the power price of the car: ";
	cin>>price;
	totalPrice+=price;
	
	cout<<"The price of the car: "<<totalPrice<<"\n";
	
	int k;
	cin>>k;
	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
APPROVED BY CLIENTS