-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRESORT.cpp
More file actions
executable file
·49 lines (40 loc) · 821 Bytes
/
Copy pathRESORT.cpp
File metadata and controls
executable file
·49 lines (40 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <iostream>
#include <stdio.h>
using namespace std;
class RESORT {
int Rno;
char Name[50];
int Charges;
int Days;
int COMPUTE(int Charges, int Days){
float amt;
amt = Charges * Days;
if(amt > 11000)
amt = amt * 1.02;
return amt;
}
public:
void Getinfo(){
cout << "Enter room number: ";
cin >> Rno;
cout << "Enter the name of the visitor: ";
cin >> Name;
cout << "Enter the charges per day: ";
cin >> Charges;
cout << "Enter the number of days of stay: ";
cin >> Days;
}
void Dispinfo(){
float amount;
cout << "Name: " << Name << "\nRoom number: " << Rno << "\nCharges per day: " << Charges << "\nAmount to be paid: ";
amount = COMPUTE(Charges, Days);
cout << amount << endl;
}
};
int main()
{
RESORT test;
test.Getinfo();
test.Dispinfo();
return 0;
}