C语言随机数

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
    int a,b;
    srand((unsigned)time(NULL));
    for(b=1;b<=100;b++)
    a = rand(),    printf("%6d ", a);
    return 0;
}

 

posted @ 2023-02-22 20:36  myrj  阅读(27)  评论(0编辑  收藏  举报