Monday, 7 January 2013

The manager of the Lakeview Hotel wants a program that calculates and displays a guest's total bill. Each guest pays a room charge that is based on a per-night rate. For example if the per night rate is $100 and the guest stays two nights, the room charge is $200.Customer also may incur a one-time room service charge and a one-time telephone charge.


#include<stdio.h>
#include<conio.h>
void main()
{
int a=100,n,bill,t,rs;
printf("enter rupees per night:");
scanf("%d",&rs);
printf("enter telephone charges:");
scanf("%d",&t);
printf("enter days=%d\ntelephone charges=%d\nroom service=%d\n",a,t,rs);
printf("enter no of days: ");
scanf("%d",&n);
bill=((a+t+rs)*n);
printf("\nbill=%d",bill);
getch();
}

1 comment:

  1. Good day, if you had to do the program as weeknights and weekends rates. How would you go about doing that?

    ReplyDelete