Hahah Wala Lng Essay

298 Words2 Pages
ITEC222 PROJECT MALLARI, Maria Airra DELA CRUZ, Janine OPENA, RJ BANSUELO, Anna Mae #include #include struct payroll{ int idnum; char name[40]; char status; float rate; float hours; float overtime; }; main() { struct payroll emp[10]; float otrate, otpay, gross, gross2, basicp; float sss, 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, "\n ======================================================= "); fprintf(outf, "\n\n\t\t\tPAYROLL\n\n"); fprintf(outf, " ======================================================= "); fprintf(outf, "\n===========================================================\n\n\n"); for(x=0;x=30000) sss=gross*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 //CONDITION 1: GP=GP-SSS-PGIBIG-PHEALTH SAKA KUNIN WTAX gross2=gross-(sss+pagibig+phealth); toupper(emp[x].status); //CONDITION 2: Single = 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, "\n\nEMPLOYEE:\t\t%d\n", emp[x].idnum); fprintf(outf, "NAME: \t\t\t%s\n", emp[x].name); fprintf(outf, "STATUS: \t\t%c\n", emp[x].status); fprintf(outf, "RATE PER HOUR: \t\t%.2f\n", emp[x].rate); fprintf(outf, "NO. OF HOURS WORKED: \t%.1f\n", emp[x].hours); fprintf(outf, "OVERTIME HOURS: \t%.1f\n", emp[x].overtime); fprintf(outf, "BASIC PAY: \t\t%.2f\n", basicp); fprintf(outf, "OVERTIME PAY: \t\t%.2f\n", otpay); fprintf(outf, "GROSS PAY: \t\t%.2f\n", gross); fprintf(outf, "DEDUCTIONS:

More about Hahah Wala Lng Essay

Open Document