Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
double price,fee,tax;
double total;
cout<<"enter the price of car:";
// read the price of car
cin>>price;
cout<<"enter the fee:";
// read the fee
cin>>fee;
cout<<"enter the tax (in %):";
// read the tax
cin>>tax;
a
// total cost
total=price+fee+(price*tax)/100;
// print the cost
cout<<"total cost is: "<<total<<endl;
return 0;
}
Step-by-step explanation:
Read the price of the car from user and assign it to variable "price",read fee and assign it to variable "fee" and tax to variable "tax".Then calculate the total cost of the car by adding the fee and tax of car to the price of car.
Output:
enter the price of car:1000
enter the fee:50
enter the tax (in %):10
total cost is: 1150