//Faith Tjia CSC5 Chapter 3, P. 143, #2
//
/*******************************************************************************
* COMPUTE STADIUM INCOME
* ______________________________________________________________________________
* This program will store the costs of tickets, ask for the amount of tickets
* for each class of seats sold, then computes the income generated from ticket
* sales.
*
* FORMUlA USED
* Income = amount of tickets * cost of ticket
* ______________________________________________________________________________
* INPUT
* classA : cost of Class A seats
* ticketA : amount of tickets Class A sold
* classB : cost of Class B seats
* ticketB : amount of tickets Class B sold
* classC : cost of Class C seats
* ticketC : amount of tickets Class C sold
*
* OUTPUT
* Income : income generated from ticket sales
*
*******************************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int classA; //INPUT - cost of class A seats
int ticketA; //INPUT - amount of tickets Class A sold
int classB; //INPUT - cost of Class B seats
int ticketB; //INPUT - amount of tickets Class B sold
int classC; //INPUT - cost of Class C seats
int ticketC; //INPUT - amount of tickets Class C sold
float Income; //OUTPUT - income generated from ticket sales
//
// Initialize Program Variables
classA = 15;
classB = 12;
classC = 9;
cout << "Enter the amount of Class A tickets sold: ";
cin >> ticketA;
cout << ticketA << endl;
cout << "Enter the amount of Class B tickets sold: ";
cin >> ticketB;
cout << ticketB << endl;
cout << "Enter the amount of Class C: ";
cin >> ticketC;
cout << ticketC << endl;
//
// Calculate The Income
Income = (classA * ticketA) + (classB + ticketB) + (classC + ticketC);
//
// Display The Income
cout << "The income of the stadium is $" << setprecision(2) << fixed
<< Income << endl;
return 0;
}