//Kanoa Holden CS1A Chapter 3, P. 143, #2
//
/*******************************************************************************
*
* COMPUTE TOTAL SALES OF TICKETS
* _____________________________________________________________________________
* This program computes the total income of tickets sold and which class sold
* the most amount of tickets
* _____________________________________________________________________________
* INPUT
* classA_Tickets : amount of class A tickets sold
* classA_price : Price of class A tickets
* classB_tickets : amount of class B tickets sold
* classB_price : price of class B tickets sold
* classC_tickets : amount of class C tickets sold
* classC_price : price of class C tickets
*
* OUTPUT
* total_income : total income from tickets sold
*
******************************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
// Declare variables to hold the number of tickets sold for each class
int classA_tickets, classB_tickets, classC_tickets;
// Prices of each class of seats
const double classA_price = 15.00;
const double classB_price = 12.00;
const double classC_price = 9.00;
// Ask the user for the number of tickets sold for each class
cout << "\nEnter the number of Class A tickets sold: ";
cin >> classA_tickets;
cout << "\nEnter the number of Class B tickets sold: ";
cin >> classB_tickets;
cout << "\nEnter the number of Class C tickets sold: ";
cin >> classC_tickets;
// Calculate the total income generated from ticket sales
double total_income = (classA_tickets * classA_price) +
(classB_tickets * classB_price) +
(classC_tickets * classC_price);
// Display the total income
cout << fixed << setprecision(2);
cout << "\nTotal income generated from ticket sales: $" << total_income << endl;
return 0;
}