ShriRam Changed status to publish July 15, 2022
#include<stdio.h> #include<conio.h> void main() { int gross_salary,basic,hra,ta,da; printf("Enter Basic salary: "); scanf("%d",&basic); printf("Enter HRA: "); scanf("%d",&hra); printf("Enter TA: "); scanf("%d",&ta); printf("Enter DA: "); scanf("%d",&da); //calculate HRA 25% of Basic salary hra = (basic*25)/100; //calculate TA 10% of Basic salary ta = (basic*10)/100; //calculate DA, 40% of Basic salary da = (basic*40)/100; //calculate Gross salary gross_salary = basic + hra + ta + da; //print Gross salary printf("\nGross salary : %d", gross_salary); getch(); }
ShriRam Changed status to publish July 15, 2022