代码如下
#include int main(){ int a[10],i; srand((unsigned)time(0)); for(i=0; i<10; i++){ a[i] = random()%10+1; } return 0 ;}