-
Notifications
You must be signed in to change notification settings - Fork 0
/
assignment4Q4.cpp
55 lines (47 loc) · 927 Bytes
/
assignment4Q4.cpp
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
50
51
52
53
54
55
#include <iostream>
using namespace std;
void maxMinNum(double x,double y,double z)
{
if(x > y && x > z){
cout<<"Maximum No. : "<< x << endl;
if(y > z){
cout << "Minimum No. : "<< z << endl;
}
else{
cout<<"Minimum No. : "<< y<< endl;
}
}
if(y > x && y > z){
cout<<"Maximum No. : "<< y << endl;
if(x > z){
cout << "Minimum No. : "<< z << endl;
}
else{
cout<<"Minimum No. : "<< x<< endl;
}
}
if(z > y && z > x){
cout<<"Maximum No. : "<< z << endl;
if(y > x){
cout << "Minimum No. : "<< x << endl;
}
else{
cout<<"Minimum No. : "<< y<< endl;
}
}
}
int main()
{
double in1,in2,in3;
cout<< "Give three input numbers :\n";
cout<< "Input 1 :";
cin>> in1;
cout<< endl;
cout<< "Input 2 :";
cin>> in2;
cout<< endl;
cout<< "Input 3 :";
cin>> in3;
cout<< endl;
maxMinNum(in1,in2,in3);
}