サンプルプログラム
/* 0
1 2
3 4 5 6
7 8 9 10 11 12 13 14
*/
#include<stdio.h>
FILE *infile, *outfile;
int tree[10000];
main()
{int i, n, in[20], out[20];
printf("Input InFilename :"); /*入力データのファイル名を入力*/
scanf("%s", in);
if ((infile=fopen(in, "r")) == NULL) {
printf("can't open file %s\n", in);
exit();
}
printf("Input OutFilename :"); /*出力データのファイル名を入力*/
scanf("%s", out);
if ((outfile=fopen(out,"w")) == NULL) {
printf("can't open file %s\n", out);
exit();
}