Computer programming
Computer programming
<<Note to instructor: Please make sure you customize the area shaded in red each time you teach this class, and remove comments in red before publishing>>
Write a program that can be used by a small theater to sell tickets for performances. The theater's auditorium has <<Put in number of digits, for example - 10>> rows of seats, with <<Put in number of digits, for example - 9>> 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 represented by a # symbol:
1 2 3 4 5 6 7 8 9
R 1 * * * # # * # # *
R 2 # * * * * * * * *
R 3 * # # * * * * * *
R 4 * * * # * * # # #
R 5 * * # * * * * * #
R 6 * * * # # # # * *
R 7 # # # * * * # # *
R 8 * * * * # # # * *
R 9 * * # # # * * * *
R 10 # # # * * * * * *
Every time a ticket or group of tickets is purchased, the program should display the total ticket prices and update the seating chart.
The program should keep a total of all ticket sales.
Assignment: <<Note to instructor: Please make sure you customize the area shaded in red each time you teach this class, and remove comments in red before publishing>>
Write a console-based procedural C++ program that generates a random number and prompts the user to guess it.
Allow the user to guess the number for << put in number of times, for example - 10 >> times. Each time the user guesses, tell the user if the guess matches. If the guess does not match, tell the user if the guess was too high or too low.
Use an integer to store the random number obtained from a built-in function, another integer to store the guess, and a constant for the maximum random number the computer can choose.
Include the proper header and make sure you properly comment your program. Also, make sure you use proper coding conventions