I have problems with this task. My code is shitty so I won't upload it.
The drama theater hall plan is described by a table of units (1) and (0). 1 - means that the room is occupied, 0 - not occupied. The first row of the table corresponds to the first row of the theater hall, the second to the second and t. t Tickets in the first two queues cost 100 Eur, in the third and fourth seals - 70 Eur, and the remaining - 40 Eur.
Create a program that calculates the amount of money collected for the sold tickets and the average fare.
The data file in the Data.txt file contains the occupancy schedule for the room. The first line contains the number of queues in the room and the number of places in each row.
In the Results.txt file, you need to deduce the amount of money collected and the average ticket price for the tickets sold.
Requirements for the program:
1. Create a function calculating the price of one place, depending on the order.
2. Create a void function that calculates the amount of money received for tickets sold and the average ticket price.
Data.txt _______________ Result.txt (can't upload pictures so here it is)