Click here to Skip to main content
See more: C++
# include <iostream>
using namespace std;
 
void Salary (int S[],int Size){
 
for (int i=0;i<=4;i++)
cout<<" Enter The Salary for Five Employee";
cin>>S[i];
 
}
 
int MaxS (int S[],int Size){
 
int max=0;
 
for (int i=0;i<=4;i++){
if (max<S[i])
max=S[i];
return max;
 
}
 
int Index (int S[],int Size){
int x;
cout<<" Enter The Salary of the Employee";
cin>>x;
for(int i=0;i<=4;i++){
if (x==S[i])
return i;
}
}
 
void Sort (int S[],int Size){
int temp;
for ( int i=0; i<=3;i++){
for ( int j=0;j<=3;j++){
if (S[j]>S[j+1]){
temp=S[j];
S[j]=S[j+1];
S[j+1]=temp;
}
}
}
for ( int m=0;i<=4;i++){
cout<<S[m];
}
}
 
void Dis (int S[],int Size){
 
cout<<" Employee Number \t\t"<<" Salary \n";
for (int i=0;i<=4i++){
cout<<i<<"\t\t"<<S[i];
}
 
int Adds (int S[],int Size){
int sum=0;
for (int i=0;i<=4;i++){
sum+=S[i];
}
return sum;
}
int Addss (int S[],Size){
int sum=0;
for(int i=2;i<=4;i++){
sum+=S[i];
return sum;
}
 
void main(){
int Size = 5,ch;
 
Salary (S,5);
do{
cout<<" Find The Max of Salaries";
cout<<" Find The Position of The Employee";
cout<<" Sort The Salary";
cout<<" Display The Salary In the Table Form";
cout<<" Adds The Salaries";
cout<<" Adds The Third, Forth and Fifth Salary;
 
switch (ch){
case 1:
cout<<"The Max of The Salary"<<Maxs(S,5);
break;
case 2:
cout<<"The Index of Empoyee"<<Index(S,5);
break;
case 3:
Sort(S,5);
break;
case 4:
Dis(S,5);
break;
case 5:
cout<<" The Adds of The Salaries is"<<sum;
break;
case 6:
cout<<" The Adds of The Third, Fourth and Fifth Salary is";
break;
defualt:
cout<<" wrong Choice ";
break;
}
 
}while (ch<=4)
}
Closed because This post is not a question, or has not been phrased in a way that allows a reasonable answer to be provided. Reported by Chris Maunder, __TR__ on Sunday, December 30, 2012 3:40pm.
Posted 30-Dec-12 0:38am
Edited 30-Dec-12 0:44am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 861
1 Kishore Pogaru 265
2 OriginalGriff 240
3 Volynsky Alex 205
4 Richard Deeming 140
0 OriginalGriff 5,640
1 Sergey Alexandrovich Kryukov 4,693
2 CPallini 4,540
3 George Jonsson 3,132
4 Gihan Liyanage 2,445


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 30 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100