ぼるじょあがC/C++の宿題を片づけますYO! 68代目
at TECH
787: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
4348日前に更新/401 KB
担当:undef