11. Write a C program to find the gross salary of an employee Gross salary = base salary + DA + HRA+Bonus DA= 40 % of the base salary, HRA=80% of DA, and Bonus= 25% of HRA. Ask user to enter the base salary only.

Posted: September 15, 2012 in CSE Sem1, ECE Sem1, Lab 9, Lab 9
#include<stdio.h>
int main()
{
int bs,da,hra,gs,bonus;
printf("Enetr Base Salary");
scanf("%d",&bs);
da=(40*bs)/100;
hra=(80*da)/100;
bonus=(25*hra)/200;
gs=da+hra+bonus+bs;
printf("%d",gs);
return 0;
}


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s