-
Notifications
You must be signed in to change notification settings - Fork 0
/
min salary.txt
85 lines (79 loc) · 1.94 KB
/
min salary.txt
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/**Creating a program to check for eligibility for maximum package.**/
#include<stdio.h>
int main()
{
char G,b,s;
int w,a;
printf("Welcome to the salary tracking services.\n");
printf("Please select your Gender.\n");
scanf("%c", &G);
printf("You have choosen %c", G);
if(G=='M')
{
printf("\nPlease state the number of years you have worked previously.\n");
fflush(stdin);
scanf("%d", &w);
printf("\nPlease state your latest academic degree.");
printf("\nFor PostGraduate, input P.");
printf("\nFor UnderGraduate, input U.\n");
fflush(stdin);
scanf("%c", &s);
{
if(w>9&&s=='P')
{
printf("You are eligible for a maximum slary package of:\n Rs.15000");
}
else if(w>9&&s=='U')
{
printf("You are eligible for a maximum slary package of:\n Rs.10000");
}
else if(w<10&&s=='P')
{
printf("You are eligible for a maximum slary package of:\n Rs.10000");
}
else if(w<10&&s=='U')
{
printf("You are eligible for a maximum slary package of:\n Rs.7000");
}
else
{
printf("Wrong input");
}
}
}
else if(G=='F')
{
printf("Please state the number of years you have worked previously.");
fflush(stdin);
scanf("%d", &a);
printf("Please state your latest academic degree.");
printf("For PostGraduate, input P.");
printf("For UnderGraduate, input U.");
fflush(stdin);
scanf("%c", &b);
if(a>9&&b=='P')
{
printf("You are eligible for a maximum slary package of:\n Rs.15000");
}
else if(a>9&&b=='U')
{
printf("You are eligible for a maximum slary package of:\n Rs.10000");
}
else if(a<10&&b=='P')
{
printf("You are eligible for a maximum slary package of:\n Rs.10000");
}
else if(a<10&&b=='U')
{
printf("You are eligible for a maximum slary package of:\n Rs.7000");
}
else
{
printf("Wrong input");
}
}
else
{
printf("Please select either F or M");
}
}