Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- char records[100][256];
- int i = 0;
- FILE * my_file = fopen("TEST.txt", "r");
- while( fscanf(my_file, "%[^\n]\n", &records[i]) != EOF )
- {
- printf("%s\n", records[i]);
- i++;
- }
- fclose(my_file);
- FILE * file_output = fopen("OUTPUT.txt", "w");
- for(int j = 0; j < i; j++)
- {
- fprintf(my_file, "%s,%s,%s\n", records[j], type_fees, total);
- // if ( j == i )
- // fprintf(my_file, "\n", records[i]);
- }
- fclose(file_output);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement