Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C program to keep records and perform statistical analysis for a car sales agency. The information of each car contains the type of
Write a C program to keep records and perform statistical analysis for a car sales agency. The information of each car contains the type of the vehicle, engine size, mileage, year, and price. Note that you cannot use while loops in the program. Program should accept information about 4 cars. We consider the program with two-dimensional array"database", where each row is an individual car, while columns represent parameters of a vehicle. 1) Function O_Car_Discount_1 that takes mileage, year and price as an argument and returns adjusted price of a car after applying discounts as per the below table. >2015 =100,000km >=2010 and > 10 2.4 180000 2805 3000 Please enter body type, engine size, mileage, year, and price of the car #2 >> 20 3.@ 1e8ee 2028 8800 Please enter body type, engine size, mileage, year, and price of the car #3 >> 18 4.5 seeee 2011 4eee Wrong vehicle type, please try again! Please enter body type, engine size, mileage, year, and price of the car #3 >> 30 4.5 5eeee 2011 4eee Please enter body type, engine size, mileage, year, and price of the car #4 >> 20 4.8 329000 2001 1900 >>>>> >>The lowest mileage on a lot: 18000 km >>The cheapest car on a lot: 1000 KD >>The oldest car on a lot is year 2ee1 >>>>> ID# Year Price 1 2005 3000 KD 2 2820 8000 KD 2011 4000 KD 4 2001 1000 KD >>>>> Please, enter ID of a car to view (or 999 to exit): 1 *** Car info: 2005 Hatchback Engine size: 2.4L Mileage: 180000 KM Original Price: 3000KD. Discounted price: 2400KD 3 +++ Please, enter ID of a car to view (or 999 to exit): 5 Wrong input! Please, try again! Please, enter ID of a car to view (or 999 to exit): 3 Car info: 2011 SUV Engine size: 4.5L Mileage: 50000 KM Original Price: 4BEEKD. Discounted price: 3800KD ****** Please, enter ID of a car to view (or 999 to exit): 999 Student name: ID
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started