Saturday, January 30, 2010

CHAP 1[H]a Calculating gross salary

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.

void main()
{
float bs,gs;
printf("\nInput Basic Salary");
scanf("%f",&bs);
gs=bs*(16.0/10.0);
printf("\nGross Salary is %f",gs);
}

5 comments: