-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4program.cpp
More file actions
31 lines (25 loc) · 745 Bytes
/
Copy path4program.cpp
File metadata and controls
31 lines (25 loc) · 745 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
//obtain the largest of 3number;
#include<iostream>
using namespace std;
int main(){
int num1,num2,num3;
cout<<"Enter a first number: ";
cin>>num1;
cout<<"Enter a second number: ";
cin>>num2;
cout<<"Enter a third number: ";
cin>>num3;
if(num1>=num2&&num1>=num3){
cout<<"Number1 is largest";
}
else if(num2>=num1&&num2>=num3){
cout<<"Number2 is largest";
}
else if(num3>=num1&&num3>=num2)
{
cout<<"Number3 is largest";
}
else{
cout<<"All Three are equal";
}
}