How To Create Salary Slip in C Programming Language
#include<stdio.h>#include<conio.h>
void main()
{
int bs,basic;
float hra,da,gs;
clrscr();
printf("basic salary of the employee");
scanf("%d",&basic);
if(basic<1500)
{
hra=basic*0.1;
da=basic*0.9;
printf("hra=%f\n",hra);
printf("da=%f\n",da);
}
else
{
hra=500;
da=basic*0.98;
printf("hra=%f\n",hra);
printf("da=%f\n",da);
}
gs=bs+hra+da;
printf("gross salary of employee=%lf",gs);
getch();
}
0 Comments