Car Rental Scenario Application Name: FLastnameChartingI4Des…
Questions
Cаr Rentаl Scenаriо Applicatiоn Name: FLastnameChartingI4Descriptiоn: Write a C program that takes user input for renting a car and utilizes selection control structures to produce different outcomes based on the input values. Requirements: Display a menu with rental options and their corresponding rental codes. User Input: Prompt the user to enter a car code (1-5). Prompt the user to enter a rental duration (1-30 days). Selection Control Implementation: Use a switch-case statement to process the selected car type. Use an if-else if structure to display a 10% discount message for rentals longer than 7 days. SAMPLE MENU 1 - Ford Explorer 2 - Chevy Convertible 3 - Dodge Truck 4 - Ford Pinto 5 - Pontiac Grand Prix Expected Behavior: If the user enters 1, the program should recognize it as a Ford Explorer. If the user enters 20 for the duration, the program should display a 10% discount message. If the user enters an invalid choice, it should display an error message. Program Structure & Formatting: Ensure proper indentation and comments to improve readability. Validate user inputs where necessary. Ensure clear and user-friendly output formatting. Include comments throughout. TIP: For simplicity, make all car rentals the same price. No calculations are required for this program. Sample Input #1 - Valid order Enter the car code (1-5): 2 Enter the duration in days (1-30): 15 Sample Output #1 You selected: Chevy Convertible Days: 15 Total Price: $45.99 per day minus a 10% discount Sample Input #2 - No Discount Enter the car code (1-5): 3 Enter the duration in days (1-30): 5 Sample Output #2 You selected: Dodge Truck Days: 5 Total Price: $45.99 per day