#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <stdio.h>
int main()
{
double basicSal;
printf("Enter the basic salary: ");
scanf("%lf", &basicSal);
/*
basic --100%
x -- 35%
x=basic*35/100
*/
double ans = 0.0;
double DA =basicSal-basicSal*0.35 ;//DA
double HRA =basicSal-basicSal*0.25;//hra
ans = basicSal + DA + HRA;
printf("Net salary: %0.3lf\n", ans);
return 0;
}
Comments
Leave a comment