chapter 18) 다양한 자료형을 형식에 맞게 입출력
#include int main(void){ FILE *ifp, *ofp; char name[20]; int kor, eng, math; int total; double avg; int res; ifp = fopen("a.txt", "r"); if (ifp == NULL){ printf("do not make the file.\n"); return 1; } ofp = fopen("b.txt", "w"); if (ofp == NULL){ printf("do not openn the file.\n"); return 1; } while(1){ res = fscanf(ifp, "%s%d%d%d", name, &kor, &eng, &math); if (res == EOF) break; total = kor + e..
2024. 10. 9.