cout<<"Welcome to Auto Cars Menulist. Please choose an Option: \t\n1: Standard \t\n2: Sport \t\n3: Personilize \t\n0: Quit"<<endl;
cin>>Menulist;
{
// loop until sentinel value read from user
switch(Menulist)
{
case 1:
cout<<"tStandard\n";
cout<<"Stereo System\n";
cout<<"Leather Interior\n";
cout<<"Modified\n";
cout<<"Would you like to trade in your old car?";
cout<<"Enter 1 for Yes or enter 2 for No \n";
cin>>answer;
if(answer == 1 )
{
cout<<"Price of old car";
cin>>price;
cout<<"is 20000\n";
cout<<"17.5%";
standard = ((20000 * 17)/100) + (2000);
cout<<"Cost of standard car is:\n"<<standard-price;
}
else if(answer == 2)
{
cout<<"Standard is 20000\n";
cout<<"17.5%";
standard = ((20000 * 17)/100) + (20000);
cout<<"Cost of standrd car is:\n "<<standard;
}
break;
case 2:
cout<<"Sport\n";
cout<<"Stereo System\n";
cout<<"Leather Interior\n";
cout<<"GPS\n";
cout<<"Modified\n";
cout<< "Enter price of car (Do not enter price if trading in)";
cin>> Cp;
amount = (quant + Cp + ( ster + gps + lther + modified));
tax = amount * VAT;
total = amount + tax;
cout<< "Cost of new car: "<<(amount)<< endl;
cout<< "Car tax: "<<(tax)<< endl;
cout<< "Final total of new car: "<< (total)<< endl;
if ((total))
cout << "Transaction complete. \n";
else
cout << "Transaction incomplete. \n";
system("pause");
return 0;
break;
case 3:
cout<<"Personilize\n";
cout<<"leather Interior\n";
cout<<"GPS\n";
cout<<"Customized Detailing\n";
cout<< "Enter price of car (Do not enter price if trading in)";
cin>> Cp;
amount = (quant + Cp + ( lther + gps + custom));
tax = amount * VAT;
total = amount = tax;
cout<< "Cost of new car: "<<(amount)<< endl;
cout<< "Car tax: "<<(tax)<< endl;
cout<< "Final total of new car: "<< (total)<< endl;
if ((total))
cout << "Transaction complete. \n";
else
cout << "Transaction incomplete. \n";
system("pause");
return 0;
}
}
}while(/* while */loginSuccess);
}
2. What was the problem statement your code is based on; how basic or otherwise would depend in part on that.
3. How far are you in your C++ studies? I can see you've done iostream input and output, iostream manipulators, while loops, switch statements, and strings. Is there anything else?