Question: 1. Using repetition and function, ask the user to enter a number N and find the factorial for N(20 Marks). 2. Write a program that

 1. Using repetition and function, ask the user to enter anumber N and find the factorial for N(20 Marks). 2. Write a

1. Using repetition and function, ask the user to enter a number N and find the factorial for N(20 Marks). 2. Write a program that prints the following diamond shape. You should ask the user to enter the number of the half of the diamond rows, as shown in the next figure. You should use function to create the diamond shape, and call that function from the main function(20 marks). nter the number of half of the rows: 10 3. A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $0.50 per hour for each hour or part thereof over three hours. The maximum charge for any given 24- hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Write a program that will calculate and print the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format, and should calculate and print the total of yesterday's receipts. The program should use the function calculateChargesto determine the charge for each customer. Your outputs should appear in the following format (30 marks): Enter the hours parked for 3 cars: 2 3 6 Charge 2.00 2.00 3.50 7.50 car Hours 2 3.0 6.0 11.0 TOTAL 4. Write a C program (You should use Function)that plays the game of guess the number" as follows Your program chooses the number to be guessed by selecting an integer at random in the range 1 to 1000. The program then types: I have a number between 1 and 1000 Can you guess my number? Please type your first guess The player then types a first guess. The program responds with one of the following 1. Excellent! You quessed the number! Would you like to play again (y or n)? 2. Too 1ow. Try again 3. Too high. Try again If the player's guess is incorrect, your program should loop until the player finally gets the number right. Your program should keep telling the player Too high or Too low to help the player "zero in" on the correct answer. (30 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!