Develop a program that calculates and prints out the total time it takes for a car and bus manufacturer to produce these vehicles, which is used at the end of production and the remaining capacity.
Request the vehicles to enter full numbers for the quantity produced.
The company's total storage capacity for vehicles is estimated at 1000 m2. A car and a bus cover 12 m2 and 30 m2 respectively. Suppose a car is built in an average of eight hours, and a bus in 24 hours. Production is not carried out simultaneously for both types of vehicles. So, for example, the total time required to produce 10 cars and 5 buses (10 × 8 = 80 hours) + (5 × 24 = 120 hours) → is calculated as a total of 200 hours.
They will also cover the total area (10 × 12 = 120 m2 ) + (5 × 30 = 150 m2) → The total area will be 270 m2.
In summary, the working principle of the program is carried out in the following steps: 1. After the user has obtained the total production quantity for the car and bus, the time and space required for total production should be printed.
2. Check that the storage capacity is not exceeded. "The storage capacity has been exceeded. Write the "Production stopped" message and get out of circulation. When this warning is issued, or when the requested information is found, the user is asked whether or not he wants to proceed with another production plan, the program should continue working with new trials until user -1 is entered.
3. If the storage capacity has not been exceeded, the remaining capacity shall be recorded at the end of the quantities of production entered by the user. Then, finally, a proposal for a three-month production cycle for car production alone. The proposal assumes that the amount of cars produced by the user is doubled every month. But every month, check that the storage capacity is not exceeded and exit the three-month cycle as soon as it exceeds. Print the quantity of production and the remaining capacity per month. As a result, it is asked whether or not the user wants to proceed with another production plan, the program should continue working from scratch with new trials until the user enters -1 (return to step 1).
And now i will give you the output i want
Enter the total production quantities for the car and the bus, accordingly: This is how many hours it takes to produce the total (it must appear at the exit for both cars and buses) That is how much space it takes for the production of balls (it needs to appear again at the output for both car and bus) If the storage capacity is exceeded, indicate this and write down that you have stopped production.
Enter 1 to proceed for another production plan; enter -1 to exit
If 1 is entered Enter the total amount of production for the car and bus in order: Again show the required time for total production as car bus on exit Again display the required place for the total production in exit by car bus if There show the remaining capacity:
Then, finally, a proposal for a three-month production cycle for car production alone. The proposal assumes that the amount of cars produced by the user is doubled every month. But every month, check that the storage capacity is not exceeded and exit the three-month cycle as soon as it exceeds. Print the quantity of production and the remaining capacity per month. As a result, it is asked whether or not the user wants to proceed with another production plan, the program should continue working from scratch with new trials until the user enters -1 (return to step 1).
This is the sample I'm asking you to take, please be careful to sort. Use c programming language please