C++ exercise:
Theater Seating Revenue with Input Validation
A dramatic theater has three seating sections, and it charges the
following prices for tickets in each section: section A seats cost
$20 each, section B seats cost $15 each, and section C seats cost
$10 each. The theater has 300 seats in section A, 500 seats in
section B, and 200 seats in section C. Design a program that asks
for the number of tickets sold in each section and then displays
the amount of income generated from ticket sales. The program
should validate the numbers that are entered for each
section.
#include <iostream>
using namespace std;
int main()
{
int aTkt,bTkt,cTkt;
int aIncome,bIncome,cIncome,total;
//reading number of tickets for class A
cout<<"Enter tickets sold for class A: ";
cin>>aTkt;
//validating the input
if(aTkt<0 || aTkt>300){
cout<<"Invalid input..Bye
bye";
return 0;
}
//reading number of tickets for class B
cout<<"Enter tickets sold for class B: ";
cin>>bTkt;
//invalid input
if(bTkt<0 || bTkt>500){
cout<<"Invalid input..Bye
bye";
return 0;
}
// //reading number of tickets for class C
cout<<"Enter tickets sold for class C: ";
cin>>cTkt;
if(cTkt<0 || cTkt>200){
cout<<"Invalid input..Bye
bye";
return 0;
}
//finding the income
aIncome=aTkt* 20;
bIncome=bTkt*15;
cIncome=cTkt*10;
total=aIncome+bIncome+cIncome;
cout<<"class A income: $"<<aIncome<<endl;
cout<<"class B income: $"<<bIncome<<endl;
cout<<"class C income: $"<<cIncome<<endl;
cout<<"Total Income : $"<<total;
return 0;
}

Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me
C++ exercise: Theater Seating Revenue with Input Validation A dramatic theater has three seating sections, and...
A dramatic theater has three seating sections, and it charges the following prices for tickets in each section:Section A seats cost $20 each, section B seatscost $15 each, and section C seats cost $10 each.The theater has 300 seats in section A, 500 seats in section B, and 200 seats in section C.Design aprogram that asks for the number of tickets sold in each section and then displays the amount of income generated from ticket sales.The program should validatethe numbers...
Using C not C++, Write a program that can be used by a small theater to sell tickets for performances. The theater’s auditorium has 15 rows of seats, with 30 seats in each row. The program should display a screen that shows which seats are available and which are taken. For example, the following screen shows a chart depicting each seat in the theater. Seats that are taken are represented by an * symbol, and seats that are available are...
Can anyone help me with this? Stadium Seating There are three seating categories at the Broward College Stadium. For a softball game, student tickets cost $9.00, senior tickets cost $12.00 and general tickets cost $15.00. Write a program that asks how many tickets for each class of seats were sold. Then display the total number of tickets sold, the amount of income generated from each class and the total ticket sales. For the program: Create pseudocode as a .txt file....
How would you code this in Python3?
Instructions from your teacher: 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 displays the amount of income generated from ticket sales.
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 a fixed-point notation with two decimal points and make sure the decimal point is always displayed. (Write for C++ code ony please)
Write a program in C to assign seats of a movie theater (capacity: 200 seats). Your program should display the following menu of alternatives: Please type 1 for "section A, $50/ticket" type 2 for "section B, $70/ticket", and type 3 for "section C, $80/ticket". If the user types 1, then your program should assign a seat in the A section (seats 1–50). If the user types 2, then your program should assign a seat in the B section (seats 51–100). If...
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. Using the following test data:...
In Python There are 3 seating categories at a stadium. Class A seats cost $20, class B cost $15, and class C $10. Write a program that asks how many tickets for each class of seats were sold, then displays the amount of income generated from tickets sales. This program should have main, calcIncome, and showIncome functions. Main function should get number of seats sold for each category and sent to calcIncome. calcIncome calculates income for each category, the return...
P7.5– A theater seating chart is implemented as a two-dimensional array of ticket prices, like this: 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 20 20 30 30...
There are three seating categories at an athletic stadium. For a baseball game, Class A seats cost $15 each, Class B seats cost $12 each, and Class C seats cost $9each. Create an application that allows the user to enter the number of tickets sold for each class. The application should be able to display the amount of incomegenerated from each class of ticket sales and the total revenue generated.Use the following test data to determine if the application is...