Write the program to find the detail of salary of an Employee.

#include<stdio.h>
#include<conio.h>
void main()
{
    int bs;
    int da;
    printf("Enter the basic salary");
    scanf("%d",&bs);
    printf("\nThe dearness allowance is as follow:");
    da=bs*40/100;
    printf("%d\t",da);
    int hr;
    hr=bs*20/100;
    printf("\nThe house rent is as follow:");
    printf("%d\t",hr);
    int gs;
    gs=bs+(da+hr);
    printf("\nThe gross salary is as follow:");
    printf("%d\t",gs);
   
}


Sample Output:


Post a Comment

Previous Post Next Post