TO ACCEPT BASIC SALARY FROM THE USER. IF BASIC SALARY>=5000 THEN HRA=15% % DA=150% OF BASIC SALARY.IF BASIC SALARY < 5000 THEN HRA=10% & DA=110% OF BASIC SALARY. DISPLAY GROSS SALARY

#include<stdio.h>
void main()
{
    float basic, hra, da;
    printf("Enter basic salary");
    scanf("%f",&basic);
    if(basic < 5000)
    {
        hra = 5000 * (15/100);
        da = 5000 * (150/100);
    }
    else if(basic >= 5000)
    {
        hra = 5000 * (10/100);
        da = 5000 * (110/100);
    }
    printf("Gross salary = %f",(basic + hra + da));
}   

3 comments: (+add yours?)

HRA calculation said...

I really get what i was looking for. Waiting for your next post to live.

HRA calculation said...

Your site is very good. There are useful information and most importantly, for sharing great. you have posted.

Siraj Shaikh said...

thanks for your comments !!!
ask me anything i wil help u out....

Post a Comment