[C์ธ์ด] #10 - ํ์ผ ์
์ถ๋ ฅ 2
ใ
กใ
กใ
กใ
กใ
ก #include void main() { FILE* in = fopen("input.txt", "r"); // read.์ฝ๊ธฐ๋ชจ๋ // ํ์ผ์ด ์กด์ฌํ์ง์์ผ๋ฉด ์๋ฌ! FILE* out = fopen("output.txt", "w"); // write.์ฐ๊ธฐ ๋ชจ๋ // ํ์ผ์ด ์กด์ฌํ์ง์์ผ๋ฉด ์์ฑ // ํ์ผ์ด ์กด์ฌํ๋ค๋ฉด ๊ธฐ์กด๋ฐ์ดํฐ๋ณด์กดxxx, ๋ฎ์ด์ฐ๊ธฐ int a; double b; char c; char d[10]; fscanf(in, "%d%lf %c%s", &a, &b, &c, d); fprintf(out, "int: %d\ndouble: %lf\nchar: %c\nstr: %s\n", a, b, c, d); fclose(in); fclose(out); } ใ
กใ
กใ
กใ
กใ
ก ใ
กใ
กใ
กใ
กใ
ก #include voi..
2021. 2. 15.