// INPUTEMPLOYEEDATA.C #include #include #include "./Header.h" void InputEmployeeData ( employee *current_employee ) { char data_correct; do { if ( data_correct == 'N' || data_correct == 'n' ) { printf("\nInput error! Try again.\n"); } printf("\nWhat is this employee's last name? :\n>"); scanf("%s", current_employee->last_name); printf("\nWhat is this employee's first name? :\n>"); scanf("%s", current_employee->first_name); printf("\nWhat is %s %s's hourly pay rate? : (Without dollar sign)\n>", current_employee->first_name, current_employee->last_name); scanf("%f", ¤t_employee->hourly_wage); printf("\nHow many hours did %s %s work this week? :\n>", current_employee->first_name, current_employee->last_name); scanf("%f", ¤t_employee->hours_worked); printf("\nHow much of their earnings has %s %s chosen to defer? : (Without dollar sign)\n>", current_employee->first_name, current_employee->last_name); scanf("%f", ¤t_employee->deferred); printf("\n%s %s worked %.2f hours this week at $%.2f per hour.", current_employee->first_name, current_employee->last_name, current_employee->hours_worked, current_employee->hourly_wage); printf("\nThey have also chosen to defer %.2f\nIs this correct? : (Y or N)\n>", current_employee->deferred); fflush(stdin); scanf("%c", &data_correct); } while ( data_correct == 'N' || data_correct == 'n' ); }