「C++」rand()で戻り値として配列を返すサンプル
サンプルコード
# include<stdlib.h>
# include<iostream>
# include<time.h>
int main(){
for (int i = 0; i < 10000; ++i) {
srand((unsigned)time(NULL));
int a=rand();
std::cout<<a<<std::endl;
}
}
Coding Changes the World
サンプルコード
# include<stdlib.h>
# include<iostream>
# include<time.h>
int main(){
for (int i = 0; i < 10000; ++i) {
srand((unsigned)time(NULL));
int a=rand();
std::cout<<a<<std::endl;
}
}