Theater Seating Revenue with Input Validation A dramatic theater has three seati
ID: 3544031 • Letter: T
Question
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.
Additional Problem Requirements:
Explanation / Answer
Pseudocode
start
declare variables
Set sec_a to 0
Set sec_b to 0
Set sec_c to 0
Set total to 0
print"How many tickets of section a sold,maximum of 300?"
read sec_a
print"How many tickets of section b required,maximum of 500?"
read sec_b
print"How many tickets of section c requiredmaximum of 200,?"
read sec_c
total=((sec_a*20)+(sec_b*15)+(sec_c*10))
print "total income generated is:-" total
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.