*****************************************************
Write a program that will get some input from the user about a visit to an oil change service. The program will calculate the bill for the services requested.
Prompt the user to input whether or not they want each of the services. You can assume the input will be a character that is either a 'y' or an 'n'. Print out the total of the bill. Write this as efficiently as you can, using as few comparisons and if statements as possible. And NO, do not use a "switch" statement.
******************************************************
This is what I have so far... it dosnt compile :(
#include<iostream>
#include<cmath>
using namespace std;
int main ()
{
int oil_change = 25;
int air_filter = 15;
int chassis_lube = 10;
int vac_and_glass = 20;
int total = 0;
char yes;
char no;
char yn = yes || no;
cout << endl;
cout << " Welcome to the car service shop! " << endl;
cout << endl;
cout << "We have many service options to chose from!" << endl;
cout << endl;
cout << "Oil change .................................... $25" << endl;
cout << "Air filter replacement ........................ $15" << endl;
cout << "Chassis Lubrication ........................... $10" << endl;
cout << "Vacuum floors and clean windows ............... $20" << endl;
cout << endl;
cout << "Please input your anwsers as y for yes and n for no" << endl;
cout << endl;
cout << "Would you like the basic oil change?";
cin >> (yn);
{
if (yn = yes)
(total = total + oil_change);
else if (yn = no)
(total = total + 0);
}
cout << endl;
cout << "Would you like an Air Filter replacement?";
cin >> (yn);
{
if (yn = yes)
(total = total + air_filter);
else if (yn = no)
(total = total +0);
}
cout << endl;
cout << "Would you like a Chassis Lubrication?";
cin >> (yn);
{
if (yn = yes)
(total = total + chassis_lube);
else if (yn = no)
(total = total + 0);
}
cout << endl;
cout << "And finally would you like the floors vacuumed and windows cleaned?";
cin >> (yn);
{
if (yn = yes)
(total = total + vac_and_glass);
else if (yn = no)
(total = total + 0);
}
cout << endl;
cout << " *** Your final total cost is $"<< total << " *** " << endl;
cout << endl;
cout << "Thank you for your business!" << endl;
return 0;
}