
#include <iostream>
using namespace std;
#include <stdlib.h>
#include <time.h>
int getrand(int max) {
return rand()%max;
}
int main()
{
int i;
srand((unsigned)time(NULL));
for (i=0; i<10; i++)
{
cout<<getrand(100)<<endl;
}
cout<<endl;
return 0;
}




by: 发表于:2017-12-13 10:33:35 顶(0) | 踩(0) 回复
??
回复评论