ぼるじょあがC/C++の宿題を片づけますYO! 68代目at TECH
ぼるじょあがC/C++の宿題を片づけますYO! 68代目 - 暇つぶし2ch787:homoじょあ ◆5OLf4yFnuM
08/01/24 00:43:29
>>772
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void){
int n, in, max = -1, i;
scanf("%d", &n);
if(n > 10)return 0;
srand((unsigned)time(NULL));
for(i=0; i<n; i++){
int tmp = rand()%101;
if(max < tmp)max = tmp;
printf("%d ", tmp);
}
printf("\n");
scanf("%d", &in);
printf("%d\n", (in == max));

return 0;
}



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch