#include <stdio.h>
int main()
{
int a[10] = {0};
int i = 0;
srand(time(NULL));
for (i = 0; i < 10; ++i)
{
a[i]= rand() % 10; // 1 - N
}
for (i = 0; i < 10; ++i)
{
printf("%d", a[i]);
}
printf ("\n------------------\n");
return 0;
}
随机数.c
最新推荐文章于 2024-07-11 22:46:59 发布