C
c
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
#include<stdio.h>
void main()
{
char g;
int yos , qual , sal=0;
clrscr();
printf(" Enter Gender , Years of Service and Qualification ( G=0 , PG=1 ):");
/* G stands for Graduate and PG stands for Post-Graduate */
scanf("%c%d%d" , &g , &yos , &qual);
if(g=='m' && yos>=10 && qual==1)
printf("sal = 15000");
else if( (g=='m' && yos>=10 && qual==0)
printf("sal = 14000");
else if( g=='m' && yos<10 && qual==1)
printf("sal = 10000");
else if( g=='m' && yos<10 && qual==0)
printf("sal = 7000");
else if( g=='f' && yos>=10 && qual==1)
printf("sal = 12000");
else if( g=='f' && yos>=10 && qual==0)
printf("sal = 9000");
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run