The manager of the Lakeview Hotel needs a program that evaluates and displays a guest's total bill. Each guest pays a room charge that is based on a per-night rate. For illustration if the per night rate is $100 and the guest stays two nights, the room charge is $200.Customer also can incur a one-time room service charge and a one-time telephone charge.
#include <iostream>
using namespace std;
int main()
{
int a = 100, n, bill, t, rs;
cout << "Room service charge, telephone charge and number of days: ";
cin >> rs >> t >> n;
bill = ((a+t+rs)*n);
cout << bill;
return 0;
}
Example:
Room service charge, telephone charge and number of days: 10 1 4
Output:
444
Comments
Leave a comment