Programming Fundamentals (Lab) Quiz 01
Programming Fundamentals (Lab) Quiz 01
Sample Run 1:
Enter the equation to evaluate: 4 + 5
Answer: 9
Sample Run 2:
Enter the equation to evaluate: 4 % 7
Answer: 4
Sample Run 3:
Enter the equation to evaluate: 5 - 3
Answer: 2
Q2. Write a program for a Rental Car Company, the program should reads the number of days
the car is rented, and the number of miles driven then calculate the cost according to the
following:
26 $ per day.
18 cent per mile (100 cent = 1 Dollar)
The first 100 miles are free.
5% discount for more than 500 miles.
The cost should be calculated in Dollar and Cent.