please help
Code:
#include <stdio.h>
#define SIZE 20
int main(void) {
FILE *inp_fptr, *out_fptr;
int num_employees, index;
float pay_rate[SIZE];
inp_fptr = fopen("clock.txt", "r");
out_fptr = fopen("payroll.txt", "w");
fscanf(inp_fptr, "%d", &num_employees);
fprintf(out_fptr, "Number of employees: %d\n", num_employees);
fprintf(out_fptr, "\nWeek 1");
return 0;
}
it reads fine from clocks.txt but when it outputs to payroll.txt, it neglects to insert any newlines
Output:
"Number of employees: 2Week 1"
Windows XP Home edition
compiling in jGrasp
-michael
//edit i opened the *.txt file in jGrasp and it output properly...oh well