#include <iostream>
#include <iomanip>
using namespace std;
int main( ) {
int classA, classB, classC;
int const PRICE_A = 15 , PRICE_B = 12 , PRICE_C = 9 ;
double incomeA, incomeB, incomeC;
double total;
// Get user input
cout << "How many class A tickets were sold ?\n " ;
cin >> classA;
cout << "How many class B tickets were sold ?\n " ;
cin >> classB;
cout << "How many class C tickets were sold ?\n " ;
cin >> classC;
//Calculate the income generated
incomeA = PRICE_A * classA;
incomeB = PRICE_B * classB;
incomeC = PRICE_C * classC;
total = incomeA + incomeB + incomeC;
// Display the income
cout << "Softball game income generated\n " ;
cout << fixed << showpoint << setprecision( 2 ) ;
cout << "Class A :" << setw( 10 ) << incomeA << endl;
cout << "Class B :" << setw( 10 ) << incomeB << endl;
cout << "Class C :" << setw( 10 ) << incomeC << endl;
cout << "____________________\n " ;
cout << "Total :" << setw( 10 ) << total << endl;
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJaW50IGNsYXNzQSwgY2xhc3NCLCBjbGFzc0M7CglpbnQgY29uc3QgUFJJQ0VfQSA9IDE1LCBQUklDRV9CID0gMTIsIFBSSUNFX0MgPSA5OwoJZG91YmxlIGluY29tZUEsIGluY29tZUIsIGluY29tZUM7Cglkb3VibGUgdG90YWw7CgkKCS8vIEdldCB1c2VyIGlucHV0Cgljb3V0IDw8ICJIb3cgbWFueSBjbGFzcyBBIHRpY2tldHMgd2VyZSBzb2xkID9cbiI7CgljaW4gPj4gY2xhc3NBOwoJCgljb3V0IDw8ICJIb3cgbWFueSBjbGFzcyBCIHRpY2tldHMgd2VyZSBzb2xkID9cbiI7CgljaW4gPj4gY2xhc3NCOwoJCgljb3V0IDw8ICJIb3cgbWFueSBjbGFzcyBDIHRpY2tldHMgd2VyZSBzb2xkID9cbiI7CgljaW4gPj4gY2xhc3NDOwoJCgkvL0NhbGN1bGF0ZSB0aGUgaW5jb21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