/* Course Number : ISYS 116 Student Name : Jason Gradziel Student Number : 826-135-535 Professors Name : Gene Rychlewski Class Name : Thursday Lab Title : PAYROL */ #include #include #include #include int setup(char IDcode[6], char fname[16], char lname[21],float hours,float rphr); int process(float hours,float rphr,float grosspay); int wrapup(char IDcode[6], char fname[16], char lname[21],float grosspay); void main(void) { char IDcode[6], fname[16], lname[21], *num; int flag=1; float hours, rphr, grosspay; while(flag==1) { clrscr(); gotoxy(20,10); printf("Enter in a number :"); gotoxy(25,11); printf("1. Run Pay Roll Program"); gotoxy(25,12); printf("2. Exit"); gotoxy(40,10); *num = getch(); *num = atoi(num); if (*num == 1) { setup(IDcode,fname,lname,hours,rphr); process(hours,rphr,grosspay); wrapup(IDcode,fname,lname,grosspay); } else flag = 0; } } int setup(char IDcode[6], char fname[16], char lname[21],float hours,float rphr) { clrscr(); gotoxy(35,2); printf("PAY ROLL"); gotoxy(4,7); printf("Please enter in the following"); gotoxy(16,9); printf("Employee ID code (A-001) : "); gets(IDcode); gotoxy(21,10); printf("First name (max 15) : "); gets(fname); gotoxy(22,11); printf("Last name (max 20) : "); gets(lname); gotoxy(9,12); printf("Number of hours worked (week) ? : "); scanf("%f",&hours); gotoxy(25,13); printf("Rate per hour ? : "); scanf("%f",&rphr); gotoxy(25,14); printf("Scanning"); for (float a=0; a<10; a++) { delay(200); printf("."); } gotoxy(25,14); printf(" "); return 0; } int process(float hours,float rphr,float grosspay) { grosspay = hours * rphr; return 0; } int wrapup(char IDcode[6], char fname[16], char lname[21],float grosspay) { gotoxy(20,15); printf("%s %s %s",fname,lname,IDcode); gotoxy(20,16); printf("Your gross pay is $%.2f",grosspay); if (grosspay > 1000) { gotoxy(25,17); printf("%s, better watch out for high taxes.",fname); } gotoxy(20,19); printf("PROGRAM COMPLETE"); getch(); return 0; }