Elite Diviner
- Joined
- Oct 10, 2005
- Messages
- 453
- Reaction score
- 0
I get 2 errors in this cant find um some1 help =/
just started learning c++ in class and this is due in about a week
// File tax.cpp
// Description: cost calculator
// Programmer: Chris
// Date: 2/8/06
#include <iostream>
using namespace std;
const fuel = .005;
const tax = .0865;
const int airport = 15;
const double discount = .13 endl;
int main()
{
int tickets;
double ticketprice, tickettotal, subtotal, fuelsurcharge, discount,
fuelcharge;
double withoutfuel, withfuel, disamount, taxamount, totaldue, Airport,
Total;
cout << "Enter the number of tickets.";
cin >> tickets
cout << "Enter the price for each ticket.";
cin >> ticketprice;
cout << endl;
tickettotal = tickets * ticketprice;
discount = tickettotal * discount;
withoutfuel = tickettotal - discount;
fuelcharge = fuel * withoutfuel;
withfuel = withoutfuel + fuelsurcharge;
taxamount = tax * withfuel;
totaldue = withfuel + taxamount + airport;
cout << "Subtotal = " << tickettotal << endl;
cout << "Amount of discount = " << disamount << endl;
cout << "Total without fuel surcharge = "<< withoutfuel << endl;
cout << "Fuel surcharge = " << fuelsurcharge << endl;
cout << "Total with fuel surcharge = " << withfuel << endl;
cout << "Tax = " << taxamount << endl;
cout << "Airport charge is $ " << Airport << endl;
cout << Total = " << totaldue << endl;
return 0;
}
just started learning c++ in class and this is due in about a week
// File tax.cpp
// Description: cost calculator
// Programmer: Chris
// Date: 2/8/06
#include <iostream>
using namespace std;
const fuel = .005;
const tax = .0865;
const int airport = 15;
const double discount = .13 endl;
int main()
{
int tickets;
double ticketprice, tickettotal, subtotal, fuelsurcharge, discount,
fuelcharge;
double withoutfuel, withfuel, disamount, taxamount, totaldue, Airport,
Total;
cout << "Enter the number of tickets.";
cin >> tickets
cout << "Enter the price for each ticket.";
cin >> ticketprice;
cout << endl;
tickettotal = tickets * ticketprice;
discount = tickettotal * discount;
withoutfuel = tickettotal - discount;
fuelcharge = fuel * withoutfuel;
withfuel = withoutfuel + fuelsurcharge;
taxamount = tax * withfuel;
totaldue = withfuel + taxamount + airport;
cout << "Subtotal = " << tickettotal << endl;
cout << "Amount of discount = " << disamount << endl;
cout << "Total without fuel surcharge = "<< withoutfuel << endl;
cout << "Fuel surcharge = " << fuelsurcharge << endl;
cout << "Total with fuel surcharge = " << withfuel << endl;
cout << "Tax = " << taxamount << endl;
cout << "Airport charge is $ " << Airport << endl;
cout << Total = " << totaldue << endl;
return 0;
}

