C 产生随机码

#include<stdio.h>
#include<malloc.h>
#include<conio.h>
#include<stdlib.h>
#include "math.h"
#include"time.h"
#define NULL 0

main()

{

float a;
srand(123456); //产生随机码的种子
printf("Random numbers are: %i %i ",rand(),rand()); // 产生伪随机码
return 0;
}

原文地址:https://www.cnblogs.com/locean/p/5266146.html