#include #include #include #include #define tup 10 //制限時間デフォルト60秒 main(int argc, char **argv) { FILE *fp; FILE *fp2; int reibun=0; int i=0; int j=0; char eng[790][1000]; char jpn[790][1000]; time_t s_time,e_time,n_time; int point = 0; int yn; int atari=0; int skip=0; char estr[1000] = ""; char xx[1000] = "x"; char xxx[1000] = "s"; // for time time_t t; struct tm *local; time (&t); local = localtime(&t); if((fp=fopen("dt_dat","a")) == NULL) printf("\a We cannot open a file.\n"); else{ fprintf(fp,"I learned english.\n"); fprintf(fp,"%d.%d.%d %d:%d:%d\n", local->tm_year+1900, local->tm_mon +1, local->tm_mday, local->tm_hour, local->tm_min, local->tm_sec ); fclose(fp); } if (argc!=2) { printf("usage: %s foo.dat\n",argv[0]); exit(10); } if ((fp2=fopen(argv[1],"r") ) == NULL ) printf("\a We cannot open a file.\n"); else{ while(fscanf(fp2,"%s %[^\n]*c",jpn[i], eng[i])!=EOF) { i++; } reibun=i; } time(&s_time); e_time = s_time + tup; time(&n_time); for (j=0; j