Write a program to enter the salary of an employ and calculate TA DA HRA by a condition TA=5%, DA=3% HRA=4% of salary


#include<stdio.h>

main(){
    float a,b,c,d; //As the salary can be in decimal the variable are defined in float
    printf("Enter the salary: ");
    scanf("%f",&a); //Enter the salary
    b=(5*a)/100; //b is the TA
    c=(3*a)/100; //c is the DA
    d=(4*a)/100; //d is the HRA
    printf("TA: %f\n",b);
    printf("DA: %f\n",c);
    printf("HRA: %f\n",d);
}