Write basic C program to calculate gross salary

5 (100%) 2 votes
write a c program to calculate gross salary
write a c program to calculate gross salary

Write a C Program for the following :-

Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.


/* To Calculate the gross salary of Ramesh */


float bp,da, hra, grpay;

clrscr(); /* TO Clear Screen*/
printf(“\n Enter the Basic Pay of Ramesh:”);

grpay=bp+da+hra; /* Gross pay = Sum of basic+All allowance */

printf(“\n Basic Pay of Ramesh=%f”, bp);
printf(“\n Dearness Allowance of Ramesh=%f”, da);
printf(“\n House Rent of Ramesh=%f”, hra);
printf(“\n Gross Pay of Ramesh=%f”, grpay);

Printf(“/n/n/n/n/n Press any key to exit….”);
getch(); /* Readsd a character from keyboard */


Run this program and tell us your output.

For any query or issue, feel free to discuss on http://discuss.eduguru.in

Satya Prakash

VOIP Expert: More than 8 years of experience in Asterisk Development and Call Center operation Management. Unique Combination of Skill Set as IT, Analytics and operation management.

One thought on “Write basic C program to calculate gross salary

Leave a Reply

%d bloggers like this: