-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththree.cpp
More file actions
35 lines (35 loc) · 736 Bytes
/
Copy paththree.cpp
File metadata and controls
35 lines (35 loc) · 736 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
//program to find the greater number from the given three numbers
#include <iostream>
#include <conio.h>
using namespace std;
class number{
private:
int a,b,c;
public:
void input(){
cout<<"Enter first number of your choice : ";
cin>>a;
cout<<"Enter second number of your choice : ";
cin>>b;
cout<<"Enter third number of your choice : ";
cin>>c;
}
void test(){
if(a>b)
if(a>c)
cout<<"First number is the greatest";
else
cout<<"third number is the greatest";
else
if(b>c)
cout<<"Second number is the greatest";
else
cout<<"third number is the greatest";
}
};
int main(){
number obj;
obj.input();
obj.test();
getch();
}