Computer Science, asked by Shrujanmehta5629, 6 months ago

Draw a Flowchart to input the monthly salary of an employee and display the income

Answers

Answered by debjyotimukherjee200
0

Explanation:

/**

* C program to calculate gross salary of an employee

*/

#include <stdio.h>

int main()

{

float basic, gross, da, hra;

/* Input basic salary of employee */

printf("Enter basic salary of an employee: ");

scanf("%f", &basic);

/* Calculate D.A and H.R.A according to specified conditions */

if(basic <= 10000)

{

da = basic * 0.8;

hra = basic * 0.2;

}

else if(basic <= 20000)

{

da = basic * 0.9;

hra = basic * 0.25;

}

else

{

da = basic * 0.95;

hra = basic * 0.3;

}

/* Calculate gross salary */

gross = basic + hra + da;

printf("GROSS SALARY OF EMPLOYEE = %.2f", gross);

return 0;

}

Similar questions