C/C++の宿題片付けます 151代目
■ このスレッドは過去ログ倉庫に格納されています
0808807
2011/07/29(金) 17:58:08.22#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void){
int num, loop;
int times[100] = { 0 };
srand( (unsigned)time( NULL ) );
for (loop = 0; loop < 10000; loop++){
num = rand()%100+100;
++times[num - 100];
}
for (loop = num; num < 100; num++)
printf("%d,%d\n", num+100, times[num] );
return (0);
}
あとどうすれば良いですか?
■ このスレッドは過去ログ倉庫に格納されています