#include <iostream>
using namespace std;
int main()
{
//variables
int mileage;
char type;
int owedPrice;
cout << "Enter Sub-Compact, Sedan, SUV, or Van: ";
cin >> type;
switch (type)
case Sub-Compact: .25 per mile;
break;
case Sedan: .50 per mile;
break;
case Suv: .75 per mile;
break;
case Van: 1.00 per mile;
cout << "How many miles have you driven? ";
cin >> mileage;
if (mileage <=100)
{
owed = car * 100;
}
else if (mileage > 100)
{
owed = car * 100 + (car * .10)(mileage - 100);
}
cout << "Your total price owed is: " << owedPrice << endl;
owedPrice = type * mileage;
return 0;
This post has been edited by JackOfAllTrades: 06 March 2010 - 07:10 PM
Reason for edit:: Added code tags. PLEASE, FOR THE LOVE OF ALL...[code]...POST YOUR CODE IN HERE!!!...[/code]

New Topic/Question
Reply
MultiQuote











|