Question: Total Rate (RM): 28 Final Price (RM): 25.2 Press [N] to stop...m >>>>>>>>>>>> Renter Name : Natasha Romanoff Movie Type 1: 3 Movie Type 2:

 Total Rate (RM): 28 Final Price (RM): 25.2 Press [N] tostop...m >>>>>>>>>>>> Renter Name : Natasha Romanoff Movie Type 1: 3 MovieType 2: 4 Movie Type 3: 5 >>> Total Rate (RM): 43.5

Total Rate (RM): 28 Final Price (RM): 25.2 Press [N] to stop...m >>>>>>>>>>>> Renter Name : Natasha Romanoff Movie Type 1: 3 Movie Type 2: 4 Movie Type 3: 5 >>> Total Rate (RM): 43.5 Final Price (RM): 36.975 Press [N] to stop...Y >>>>>>>>>>>> Renter Name : T'Challa Movie Type 1: 5 Movie Type 2: 2 Movie Type 3: 4 >>> >>> Total Rate (RM): 34 Final Price (RM): 30.6 Press [N] to stop...k SAMPLE PROGRAM EXECUTION >> >>> Renter Name : Nick Fury Movie Type 1: 1 Movie Type 2: 2 Movie Type 3: 1 >>> >> Total Rate (RM): 15.5 Final Price (RM): 13.95 Press [N] to stop...y >>> >>> Renter Name : Tony Stark Movie Type 1: 4 Movie Type 2: 4 Movie Type 3: 0 >> >>> 3 3 Task 5: Write a main function to perform the following tasks: (21.5 marks) a) You need to use an appropriate LOOP to perform the process in this function. The loop will be terminated when the user press 'N'. b) You are NOT ALLOWED to use arrays except an array of characters. c) The function should ask the user to enter a renter name. d) The function should calculate the total rate using the following formula: Total Rate = (Movie Type 1x2)+(Movie Type 2x5)+(Movie Type 3x3.5) e) The function will sum up the overall total of total rate and calculate the total number of each rented movie type. f) The function may need to call the functions that are defined in Task 2, Task 3, and Task 4. g) The program should produce the output as in the sample execution given below. Note: The values in bold are input by the user. Task 6: List all function prototypes. (4 marks) Task 7: You must ensure your program fulfill the following criteria: (7 marks) a) The program is able to run. b) The program uses an appropriate structure for the program (e.g. all required header files are included, the program is properly written, proper indentation, etc.) SAMPLE PROGRAM EXECUTION >> >>>> Renter Name : Nick Fury Movie Type 1: 1 Movie Type 2: 2 Movie Type 3: 1 Total Rate (RM): 28 Final Price (RM): 25.2 Press [N] to stop...m >>>>>>>>>>>> Renter Name : Natasha Romanoff Movie Type 1: 3 Movie Type 2: 4 Movie Type 3: 5 >>> Total Rate (RM): 43.5 Final Price (RM): 36.975 Press [N] to stop...Y >>>>>>>>>>>> Renter Name : T'Challa Movie Type 1: 5 Movie Type 2: 2 Movie Type 3: 4 >>> >>> Total Rate (RM): 34 Final Price (RM): 30.6 Press [N] to stop...k SAMPLE PROGRAM EXECUTION >> >>> Renter Name : Nick Fury Movie Type 1: 1 Movie Type 2: 2 Movie Type 3: 1 >>> >> Total Rate (RM): 15.5 Final Price (RM): 13.95 Press [N] to stop...y >>> >>> Renter Name : Tony Stark Movie Type 1: 4 Movie Type 2: 4 Movie Type 3: 0 >> >>> 3 3 Task 5: Write a main function to perform the following tasks: (21.5 marks) a) You need to use an appropriate LOOP to perform the process in this function. The loop will be terminated when the user press 'N'. b) You are NOT ALLOWED to use arrays except an array of characters. c) The function should ask the user to enter a renter name. d) The function should calculate the total rate using the following formula: Total Rate = (Movie Type 1x2)+(Movie Type 2x5)+(Movie Type 3x3.5) e) The function will sum up the overall total of total rate and calculate the total number of each rented movie type. f) The function may need to call the functions that are defined in Task 2, Task 3, and Task 4. g) The program should produce the output as in the sample execution given below. Note: The values in bold are input by the user. Task 6: List all function prototypes. (4 marks) Task 7: You must ensure your program fulfill the following criteria: (7 marks) a) The program is able to run. b) The program uses an appropriate structure for the program (e.g. all required header files are included, the program is properly written, proper indentation, etc.) SAMPLE PROGRAM EXECUTION >> >>>> Renter Name : Nick Fury Movie Type 1: 1 Movie Type 2: 2 Movie Type 3: 1

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!