ITEC222 PROJECT MALLARI, Maria Airra DELA CRUZ, Janine OPENA, RJ BANSUELO, Anna Mae #include #include struct payroll{ int idnum; coal puddle[40]; char status; rove rate; spoil hours; cast overtime; }; main() { struct payroll emp[10]; float otrate, otpay, uncouth, coarse2, basicp; float selective service, wtax, netp, deduc; int pagibig, phealth, x; FILE *outf; char filename[20]; printf(Enter the name of file: ); scanf(%s, &filename); outf=fopen(filename, w); fprintf(outf, ===========================================================); fprintf(outf, ======================================================= ); fprintf(outf, PAYROLL); fprintf(outf, ======================================================= ); fprintf(outf, ===========================================================); for(x=0;x=30000) sss= piggy*0.15; else if(gross>=20000) sss=gross*0.1; else if(gross>=10000) sss=gross*0.05; else sss=gross*0.01; //Witholding Ta x // specify 1: GP=GP-SSS-PGIBIG-PHEALTH SAKA KUNIN WTAX gross2=gross-(sss+pagibig+phealth); toupper(emp[x].status); //CONDITION 2: item-by-item = 15%; Head of Family= 10%; Married = 5% if(emp[x].status==S) wtax=gross2*0.15; else if(emp[x].status==M) wtax=gross2*0.

05; else wtax=gross2*0.1; deduc=wtax+pagibig+phealth+sss; netp=gross-deduc; fprintf(outf, EMPLOYEE:%d, emp[x].idnum); fprintf(outf, strike: %s, emp[x].name); fprintf(outf, situation: %c, emp[x].status); fprintf(outf, RATE PER hour: %.2f, emp[x].rate); fprintf(outf, NO. OF HOURS WORKED: %.1f, emp[x].hours); fprintf(outf, extra time HOURS: %.1f, emp[x].overtime); fprintf(outf, BASIC PAY: %.2f, basi cp); fprintf(outf, OVERTIME PAY: %.2f, otpa! y); fprintf(outf, GROSS PAY: %.2f, gross); fprintf(outf, DEDUCTIONS: %.2f, deduc); fprintf(outf, NET PAY: %.2f, netp); } fclose(outf); system(pause); }If you want to get a safe essay, order it on our website:
OrderEssay.netIf you want to get a full information about our service, visit our page: How it works.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.