#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
char ch,qual;
int a;
printf("enter the gender\n[M] for male\n[FM] for female\n qualification \n[G] for graduate \n[P] for post graduate\n year of service ");
scanf("%c%c%d",&ch,&qual,&a);
getchar();
if(ch=='M' || ch=='m'){
if(qual=='g' || qual=='G'){
if(a>=10)
printf("salary is 10000");
else
printf(" salary is 7000");
}
else if(qual=='p' || qual=='P'){
if(a>=10)
printf("salary is 15000");
else
printf(" salary is 10000");
}
}
else if(ch=='FM' || ch=='fm') {
if(qual=='g' || qual=='G'){
if(a>=10)
printf("salary is 9000");
else
printf(" salary is 6000");
}
else if(qual=='p' || qual=='P'){
if(a>=10)
printf("salary is 12000");
else
printf(" salary is 10000");
}
}
else
printf("invalid entry");
system("PAUSE");
return 0;
}
#include <stdlib.h>
int main(int argc, char *argv[])
{
char ch,qual;
int a;
printf("enter the gender\n[M] for male\n[FM] for female\n qualification \n[G] for graduate \n[P] for post graduate\n year of service ");
scanf("%c%c%d",&ch,&qual,&a);
getchar();
if(ch=='M' || ch=='m'){
if(qual=='g' || qual=='G'){
if(a>=10)
printf("salary is 10000");
else
printf(" salary is 7000");
}
else if(qual=='p' || qual=='P'){
if(a>=10)
printf("salary is 15000");
else
printf(" salary is 10000");
}
}
else if(ch=='FM' || ch=='fm') {
if(qual=='g' || qual=='G'){
if(a>=10)
printf("salary is 9000");
else
printf(" salary is 6000");
}
else if(qual=='p' || qual=='P'){
if(a>=10)
printf("salary is 12000");
else
printf(" salary is 10000");
}
}
else
printf("invalid entry");
system("PAUSE");
return 0;
}
No comments:
Post a Comment