Hello friend, I found this question from a pass paper of our institute. can anyone please submit a sample answer program for this question? If it is a great help for me.
Hotel rates of CN hotels( Pvt) ltd. for one day are listed below.
Type Room Charges (Rs)
1 15000.00
2 17500.00
3 22000.00
It has only three types of rooms(l,2 and 3) and offers different discounts for the period of the year
as shown below.
Jan - Mar-----------10.0---------12.0-----------11.0
Apr - Jul-------------7.5----------8.0-------------7.0
Aug - Oct-----------15.0---------12.0-----------10.0
Nov - Dee-----------5.0----------4.0-------------5.0
Write a program to allow the user to enter the type of the room, month and no of days. This
should be repeated for several types of rooms and can exit by entering 0 as shown in the sample
output. The program should then calculate and display the total amount needed to be paid.
If the user enters a wrong type for the room, your program should display an error message
"Invalid type of room".
When entering the month the user can enter only "Jan", "Feb", "Mar","Apr", etc. Display an
error message "Incorrect Month" for any other values.
Format your output to two decimal places.
Sample Output:
Enter type of the room 2
Enter the month : Apr
Enter no of days : 2
Enter type of the room 1
Enter the month : Apr
Enter no of days : 2
Enter type of the room :0
Total Amount (Rs) : 59950.00