I am trying to write a program in C that would be used by a car rental company. This program finds the subtotal, tax amount(6%) and finally the total. The user enters in how many days the car was rented and how many miles were driven.

The total is based on this logic. The cars are rented for 15.00 per day plus .40 cents per mile if the car is driven less then 200 miles. If the car is driven more then 200 miles, the rate per mile is lowered to .35 cents per mile.

I know how to get the input from the user with printf and scanf but I am struggling with what to do next. I have to use a if...else statement. I don't have a firm grasp on C code yet.

1 answer

bbbb