/******************/ /* 小倉百人一首 */ /******************/ #include #include #include #include #include void REDtxt(int*); // テキストファイルを読む void explode(char*,char*,int); // 項目を取り出す char kami[100][64]; // 上の句 char simo[100][64]; // 下の句 char yomi[100][64]; // 詠み人 int utaNo; // 歌番号 int utaNoB[10]; // 場の歌番号 void main( ) { char c[128]; int N,i,j,k; printf("\n##################\n"); printf("\n# 小倉百人一首 #\n"); printf("\n##################\n"); printf("\n 0を入力すると終了します\n\n"); fflush(stdout); srand(time(NULL)); // 乱数の準備 REDtxt(&N); // テキストファイルを読む if ( N==0 ) goto END; while ( 1 ) { //--10首選択-- for( i=0; i<10; i++ ) { utaNoB[i]=rand( )%100+1; // 歌番号計算 for( k=0; k