//Displaying highest salary
//Programmer name: Sohail ahmed
//09/03/2010
#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
float emp_1, emp_2, emp_3;
cout<<"Enter salary of 1st employer: ";
cin>>emp_1;
cout<<"\nEnter salary of 2nd employer: ";
cin>>emp_2;
cout<<"\nEnter salary of 3rd employer: ";
cin>>emp_3;
if(emp_1 > emp_2 && emp_3)
cout<<"\nEmployee one(1st) has highest salary";
else if(emp_2 > emp_1 && emp_3)
cout<<"\nEmployee two(2nd) has highest salary";
else if(emp_3 > emp_2 && emp_1)
cout<<"\nEmployee three(3rd) has highest salary";
else
cout<<"Invalid option";
getch();
return 0;
}
0 comments:
Post a Comment