I'm making a car retal program for a friends new business, heres the deal:
He has 5 locations, 5 different type of cars in each, different pricing on all, and different price depending if rented during weekend.
So the program will look like:
Which location 1-5:
Which type of car:
Which weekday:
How many KM driven:
Then the out the following:
Rental Charge: 15.00
Extra Kms Charge: 70.00
Total Charge: 85.00
- Deposit 500.00
Refund: $415.00
---
So far I'm here,
Getting all the information now I don't know where to go from here, case statements, if statements, switch?Code:#include <stdio.h> main() { int location, veh_type, weekday, km, insurance, prev; printf("Enter Location:"); scanf("%d", &location); printf("Enter Vehicle Type:"); scanf("%d", &veh_type); printf("Enter Weekday:"); scanf("%d", &weekday); printf("Enter Amount of KM Driven:"); scanf("%d", &km); printf("Enter insurance (1-Yes/0-No):"); scanf("%d", &insurance); printf("Have you previously rented with US? (1-Yes/0-No):"); scanf("%d", &prev); }



LinkBack URL
About LinkBacks



