笔记: 随机数

来源:互联网 发布:银行大数据 客户分层 编辑:程序博客网 时间:2024/06/05 14:49

#include <stdio.h>

#include<time.h>


int main()

{

    int i, num[10];

   srand (time(NULL));

    for( i = 0; i< 10; i++)

    {

        num[i]=rand()%10;

        printf("%d\n",num[i]);

    }

    return 0;

}

0 0
原创粉丝点击