Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Interactive Programming Exercise 1

1. Write a program that formats product information entered by the user. A session
with the program should look like the following: ( the user's input has been
underlined )
Interactive Programming Exercise 1

2. Write a program to handle the calculation of GPA. The relevant formula is:
GPA=(Grade point 1 x Credit 1 + Grade point 2 x Credit 2 + Grade point 3 x Credit 3 ) / Total Credit

The output should look like the following:


Interactive Programming Exercise 1

3. Write a program to process the details of some books purchase. The output
of the program should look like the following:
Interactive Programming Exercise 1

4. Write a program to process the details of automobile rental. The output of


the program should look like the following:

****************
One World Auto Rental
****************
Year Model : 2010
Make : Honda City
Plate Number : WGE7614
Enter Rental Days :3
Rental Rate Per Day : RM120.00
Promotional Discount Rate(%) :2

Summary Receipt
-------------
Total Payment for 3 days @ Rental Rate RM120.00 per day
Vehicle Details = => Honda City (2010) WGE7614
Promotional Discount Rate 2% = RM 7.20

PAYMENT
RM360.00 – RM7.20 = RM352.80

Reference :
total payment = rental rate x day
discount=promotional discount rate /100 X total payment
payment=total payment – discount

You might also like