TURBO-C CODE EXAMPLE (Compute For The Total Net Income)
TURBO-C CODE EXAMPLE (Compute For The Total Net Income)
/*PROBLEM: Make a program that will compute for the net income of a particular employee. You have
to accept name, position, and number of hours worked. The position has three (3) categories; Manager
rate per hour P500; if supervisor rate per hour is P400; if employee rate per hour is 300.Then after
accepting the number of hours worked.
sss = 10%
Medical = 100
tax
#include <stdio.h>
int a, b, c, d, e;
float z, y, x, w, v;
main ()
clrscr ();
scanf ("%s",&a);
scanf ("%s",&b);
switch(b)
case '1':
scanf ("%d",&c);
d=c*500;
y=d*0.1;
x=100;
if(d>=7000)
z=d*0.15;
printf ("%0.2f",z);
}
else if(d>=4000 && d<=6999)
z=d*.1;
printf ("%0.2f",z);
z=d*0.5;
printf ("%0.2f",z);
w=x+y+z;
v=d+e-w;
break;
case '2':
scanf ("%d",&c);
d=c*400;
y=d*0.1;
x=100;
if(d>=7000)
z=d*0.15;
printf ("%0.2f",z);
}
z=d*.1;
printf ("%0.2f",z);
z=d*0.5;
printf ("%0.2f",z);
w=x+y+z;
v=d+e-w;
break;
/*ESQUIVEL, J. P
[email protected]*/
case '3':
d = c*300;
if(d>=8000)
y=d*0.1;
x=100;
if(d>=7000)
z=d*0.15;
printf ("%0.2f",z);
z=d*.1;
printf ("%0.2f",z);
z=d*0.5;
printf ("%0.2f",z);
w=x+y+z;
v=d+e-w;
break;
default:
getche();