move to repo.or.cz
[letusc.git] / ch2 / examples / example4.c
blobddea032faa9568896fa9eab197ee1dccd1aaa759
1 #include<stdio.h>
3 int main()
6 float basic,gross,hra,da;
8 printf("Enter the basic salary: ");
9 scanf("%f",&basic);
11 if(basic<1500)
13 hra=basic*10/100;
14 da=basic*90/100;
16 else
18 hra=500;
19 da=0.98*basic;
21 gross=basic+hra+da;
22 printf("The gross salary is %f\n",gross);
23 return 0;