-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLAB6.cpp
39 lines (33 loc) · 1.04 KB
/
LAB6.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
//lab5
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
int Pay[5];
cout<<"Enter 1st Employee Salary=";
cin>> Pay[0];
cout<<"Enter 2nd Employee Salary=";
cin>> Pay[1];
cout<<"Enter 3rd Employee Salary=";
cin>> Pay[2];
cout<<"Enter 4th Employee Salary=";
cin>> Pay[3];
cout<<"Enter 5th Employee Salary=";
cin>> Pay[4];
if(Pay[0]>Pay[1] && Pay[0]>Pay[2] && Pay[0]>Pay[3] &&Pay[0]>Pay[4])
cout<<"1st Employee pay is gretest";
else if(Pay[1]>Pay[2] && Pay[1]>Pay[0] && Pay[1]>Pay[3] &&Pay[1]>Pay[4])
cout<<"2nd Employee pay is gretest";
else if(Pay[3]>Pay[1] && Pay[3]>Pay[2] && Pay[0]<Pay[3] &&Pay[3]>Pay[4])
cout<<"3rd Employee pay is gretest";
else if(Pay[2]>Pay[1] && Pay[0]<Pay[2] && Pay[2]>Pay[3] &&Pay[2]>Pay[4])
cout<<"4th Employee pay is gretest";
else if(Pay[4]>Pay[1] && Pay[4]>Pay[2] && Pay[4]>Pay[3] &&Pay[0]<Pay[4])
cout<<"5th Employee pay is gretest";
else if(Pay[0]==Pay[1]==Pay[2]==Pay[3]==Pay[4])
cout<<"All Pays are Equal";
else
cout<<"Invalid Choice";
return 0;
}