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...
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 • Implement, using structures and functions as appropriate, a program which requires you to...
C coding • Implement, using structures and functions as appropriate, a program which requires you to enter a number of points in 3 dimensions. The points will have a name (one alphanumeric character) and three coordinates x, y, and z. Find and implement a suitable way to stop the input loop. The program, through an appropriate distance function, should identify the two points which are the furthest apart. Another function should calculate the centre of gravity of the point cloud...
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...
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, 60 % were issued by​ cities, 10 % by​ suburbs, and 30 % by rural areas. Of the municipal bonds rated​ B, 40 % were issued by​ cities, 50 % by​ suburbs,...
A sports team has a stadium that holds a maximum of 36,000 fans. The league has suggested that the owners of the team consider expanding its seating to 40,000.
A sports team has a stadium that holds a maximum of 36,000 fans. The league has suggested that the owners of the team consider expanding its seating to 40,000. The cost of permits, project management, and construction is expected to be $40,000 per seat. Work can be accomplished over two years, at which time the club will have 4,000 additional seats to sell. Assume the investment would occur equally over years 0 and 1.Each seat will generate an additional $3,500...
Simple code for a game on C coding.
Simple code for a game on C coding.
There are three categories of financial ratios: liquidity, solvency, and profitability. Using the SEC data for...
There are three categories of financial ratios: liquidity, solvency, and profitability. Using the SEC data for Macys, found here: https://www.sec.gov/cgi-bin/viewer?action=view&cik=794367&accession_number=0000794367-18-000036&xbrl_type=v# Describe what each category tells the user about the financial health of a company. Choose three ratios in each category and describe what the ratios tell the user about the company. How are financial ratios used to evaluate a company? Discuss what the numbers would be compared against for analysis. Calculate each ratio for your companies. What do the ratios...
Using python coding, test for convergence of an infinite sequence or series. keep the coding at...
Using python coding, test for convergence of an infinite sequence or series. keep the coding at beginner level please!
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT