实验2-实验任务1

 1 #include <stdio.h>
 2 #include <stdlib.h>
 3 #include <time.h>
 4 #define N 5
 5 #define N1 374
 6 #define N2 465
 7 int main()
 8 {
 9     int number;
10     int i;
11     srand(time(0)); // 以当前系统时间作为随机种子
12     for (i = 0; i < N; ++i) {
13         number = rand() % (N2 - N1 + 1) + N1;
14         printf("202383290388%04d\n", number);
15     }
16     return 0;
17 }

 

posted @ 2023-10-25 19:52  铭懿  阅读(11)  评论(0)    收藏  举报