Question

In: Computer Science

Using Coding langues C ++ ---------------------------------------- There are three seating categories at a stadium. For a...

Using Coding langues C ++

----------------------------------------

There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class B seats cost $12, and Class C seats cost $9. Write a program that asks how many tickets for each class of seats were sold, then displays the amount of income generated from ticket sales. Format your dollar amount in fixed-point notation, with two decimal places of precision, and be sure the decimal point is always displayed.

Solutions

Expert Solution

Source Code:

#include <iostream>
using namespace std;

int main()
{
   int classA_seats=0,classB_seats=0,classC_seats=0;
   float total_income=0.0;

   cout<<"How many class A seats are sold:";
   cin>>classA_seats;
   cout<<"How many class B seats are sold:";
   cin>>classB_seats;
   cout<<"How many class C seats are sold:";
   cin>>classC_seats;

   total_income = classA_seats*15 + classB_seats*12 + classC_seats*9;
   printf("Toatl income generated from ticket sales:$ %.2f\n",total_income);
   return 0;
}


Related Solutions

In Python There are three seating categories at a stadium. Class A seats cost $20, Class...
In Python There are three seating categories at a stadium. Class A seats cost $20, Class B seats cost $15, and Class C seats cost $10. Write a program that asks how many tickets for each class of seats were sold, then display the amount of income generated from ticket sales. \ your program MUST contain a main function, a calcIncome function, and a showIncome function. Your main function should get the number of seats sold for each category. The...
n Python There are three seating categories at a stadium. Class A seats cost $20, Class...
n Python There are three seating categories at a stadium. Class A seats cost $20, Class B seats cost $15, and Class C seats cost $10. Write a program that asks how many tickets for each class of seats were sold, then display the amount of income generated from ticket sales. \ your program MUST contain a main function, a calcIncome function, and a showIncome function. Your main function should get the number of seats sold for each category. The...
Explain the range of luxury seating pricing at American Airlines Center and Yankee Stadium. From a...
Explain the range of luxury seating pricing at American Airlines Center and Yankee Stadium. From a sports facility management stand point.
Real Madrid stadium requires seats for home and away end. The seating project results in $1.2...
Real Madrid stadium requires seats for home and away end. The seating project results in $1.2 MM/yr of annual savings. The seating project requires a fixed capital investment of $3.5 MM. The working capital investment is taken as 15/85 of the fixed capital investment. The annual operating cost of the stadium seating is $0.5 MM/yr. Straight-line depreciation is calculated over 10 years (no salvage value). The corporate income tax rate for the project is 35%. Assuming a discount rate of...
1. Complete Programming Problem #14, Stadium Seating, on page 199 of the textbook. A revised form...
1. Complete Programming Problem #14, Stadium Seating, on page 199 of the textbook. A revised form (original form provided in Figure 3-49) is provided below based upon theAdditional Requirements. Data is also provided to test the application. The ADDITIONAL REQUIREMENTS described below MUST also be implemented: Apply the currency format string for displaying monetary output (i.e., displays a leading currency symbol, digits, comma separators, and a decimal point) Apply the number format string for displaying non-monetary output with no decimal...
Write a code for simple racing game (using dots) on c coding.
Write a code for simple racing game (using dots) on c coding.
***C++ Coding*** Write a program for sorting a list of integers in ascending order using the...
***C++ Coding*** Write a program for sorting a list of integers in ascending order using the bubble sort algorithm. Please include comments to understand code. Requirements Implement the following functions: int readData( int **arr) arr is a pointer to pointer for storing the integers. The function returns the number of integers. The function readData reads the list of integers from a file call data.txt into the array arr. The first integer number in the file is the number of intergers....
Using C++, identify suitable coding modules for the following (a) Overload the * operator so that...
Using C++, identify suitable coding modules for the following (a) Overload the * operator so that two instances of Quat can be multiplied using the * operator. Given that q1 and q2 are Quaternions. Let q1 = (a1, b1i, c1j, d1k) and q2 = (a2, b2i, c2j, d2k) The product (q1 * q2) is ( a1a2 – b1b2 – c1c2 – d1d2, (a1b2 + b1a2 + c1d2 – d1c2)i, (a1c2 + c1a2 + d1b2 – b1d2)j, (a1d2 + d1a2 +...
Create a basic functioning Deep Belief Network coding using C++ or MATLAB.
Create a basic functioning Deep Belief Network coding using C++ or MATLAB.
A municipal bond service has three rating categories​ (A, B, and​ C). Suppose that in the...
A municipal bond service has three rating categories​ (A, B, and​ C). Suppose that in the past​ year, of the municipal bonds issued thoughout a​ country, 60% were rated​ A, 30% were rated​ B, and 10% were rated C. Of the municipal bonds rated​ A, 30% were issued by​ cities, 30% by​ suburbs, and 40% by rural areas. Of the municipal bonds rated​ B, 40% were issued by​ cities, 50% by​suburbs, and 10% by rural areas. Of the municipal bonds...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT