Turbo C + + program to calculate salary script

To facilitate the work of an accountant in salaries to employees, then I made ​​the turbo C + + program to calculate salary of each employee as a whole. Below is a sample script that is used to calculate and help facilitate the work of accountants.


#include <stdio.h>
void main ()
{
    printf ("COUNT SALARY EMPLOYEE\n\n\n");
    char name[25];
    int salary;
    float allowance;
    float tax;
    float net salary;
    printf ("Employee Name :");
    scanf ("%s",&name);
    printf ("SALARY :");
    scanf ("%d",&salary);
    allowance = 0.2*salary;
    tax = 0.15 * (salary+allowance);
    net salary = salary+allowance-tax;
    printf ("Employee Benefits is : %f\n",allowance);
    printf ("The tax must be paid : %f\n",tax);
    printf ("Net Salary Learned : %f\n",net salary);
    getchar ();
}

Post a Comment

0 Comments