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);
}
Subscribe to:
Post Comments (Atom)
why is we have to multiply by 16?
ReplyDeletewhy multiply by 16 ?
ReplyDeleteGross salary=b_salary+h_rent+d_allowance
ReplyDeleteVisit My Blog For Latest C Programming Exercise
@nidhi
ReplyDeletegross salary= basic salary(1+40/100+20/100)
why we r multiplying b.s by 16/10 ???
ReplyDelete