Question: Write a C program which uses a structure type that stores data records for a car, as described in the Requirements below. Requirements: Define a

 Write a C program which uses a structure type that stores

Write a C program which uses a structure type that stores data records for a car, as described in the Requirements below. Requirements: Define a global structure and name it as Car. This structure has these member variables: Make (string), model (string), year (int), mileage (double), original_price (double), and sale_price(double) sale_price will be calculated based on original_price and mileage. Declare two variables from structure car and call it car_number1 and car_number2. Write a function called get_nput, which is responsible to Get the input values for the member variables of car_numberl and car_number2 For sale_price enter zero. This value will be updated later by function price_calculation This function uses call by reference for car_number1 and car_number2 For string member variables use the correct input method Write a function called price_calculation which gets car_number1 and car_number2 as input (call by reference) and update the sale_price. If the car mileage is greater than 70,000 miles then the sale_price is 70% of the original_price. Otherwise the sale_price is 85% of the original_price. Write a function called print_output which is responsible To print the information for each car separately (including the update value of sale_price) This function should print the output based on alphabet order of car's make

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!