ITEC222 PROJECT MALLARI, Maria Airra DELA CRUZ, Janine OPENA, RJ BANSUELO, Anna Mae #include #include struct payroll{ int idnum; cleaning woman puddle[40]; char status; rove rate; spoil hours; ice-cream float 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= earn*0.15; else if(gross>=20000) sss=gross*0.1; else if(gross>=10000) sss=gross*0.05; else sss=gross*0.01 ; //Witholding Tax // 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].overti! me); fprintf(outf, BASIC PAY: %.2f, basicp); fprintf(outf, OVERTIME PAY: %.2f, otpay); 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 teeming essay, order it on our website: OrderCustomPaper.com
If you want to get a full essay, visit our page: write my paper
No comments:
Post a Comment