C/C Language question
Expert: Zlatko - 4/8/2010
Question"The sign on the attendant’s booth at the XYZ parking lot is XYZ VISITOR PARKING
Cars:
First 2 hours Free
Next 3 hours 0.50/hour
Next 10 hours .25/hour
Trucks:
First 1 hour Free
Next 2 hours 1.00/hours
Next 12 hours 0.75/hour
Senior Citizens: Free of charge
Write a program that will accept as input a one-character designator (C, T or S) Followed by two military numbers in range of 0600-2200 (6:00 A.M to 10:00 P.M).
The program should Then compute the appropriate charge and the round up time that car was parked. The output should be printed for each vehicle , arrival time, departure time and cost. Your program should also provide a summer at the end of each day indicating total cars, trucks, and senior , time and fees. Your program should have loop which ends with ^Z.
how can I make program that runs this in C language
AnswerHello Shawn
At first, simplify the problem. Don't worry about the summary. You can do that later when you are more comfortable with the problem.
Try to write out in English the steps and calculations that your program is to do. Imagine you are explaining it to another person who doesn't know much, but is very good at arithmetic. Show me that you've done some work on the problem. Also explain to me what you are having trouble with. Is it input from the user, the loop, the calculation, or something else. If you have any code written, show me that. I'll help you, but I cannot do it all for you.
Best regards
Zlatko