Question: Write a C program to calculate the cost of your Mawaqif parking ticket given the following. You need to ask the user to enter the


Write a C program to calculate the cost of your Mawaqif parking ticket given the following. You need to ask the user to enter the number of hours along with the type of parking (S or P) according to the below table: Number of hours Cost (Standard) Cost (Premium) 1 hour 2 dhs 3 dhs 2 hours 4 dhs 6 dhs 3 hours 6 dhs 9 dhs 4 hours 8dhs 12 dhs More than 4 hours 15 dhs 18 dhs Sample output: Please enter number of hours:2 Please enter type: 5 The cost is: 4 dhs. Marking criteria: Correct use of the main function Correct use of printf and Scanf Correct use of control sturctures Program logic and correctness 2 3 S 5 TTT Arial 3 (12pt) TI Moving to another question will save this response. Question 9 Write a code to ask the user to enter 10 numbers and find their average. - You must ask the user in the main function to enter the numbers in an array, - send the array to Average function to find the average value and return it to main. - print the average in the main function. TT T Arial 3 (12pt) TE Path:p
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
