Write your questWrite a program in a script file that calculates the cost of renting a car according into the following price schedule:
Types of car Rental Period
1-6 days 7-27 days 28-60 days
Class B RM27 per day RM162 for 7 days, + RM25 for each additional day RM662 for 28 days, + RM23 for each additional day
Class C RM34 per day RM204 for 7 days, + RM31 for each additional day RM284 for 28 days, + RM28 for each additional day
Class D Class D cannot be rented for less than 7 days RM276 for 7 days, + RM43 for each additional day RM1136 for 28 days, + RM38 for each additional day
The program asks the user to enter the rental period and the type of car. The program then displays the cost. If period longer than 60 days is entered, a message “Rental is not available for more than 60 days” is displayed. If period rental is less than 6 days is entered for class D, a message “Class D cars cannot be rented for less than 6 days is displayed.
Run the program for nine times for the following cases:
Class B for 3, 14 and 50 days
Class C for 20, 28 and 61 days
Class D for 6, 18 and 60 days.
ion here.