rand.h#ifndef RAND_Hunsigned long int next = 1;int rand() { next = next * 1103515245 + 12345; return (unsigned int)(next/65535) % 32768;}void seed(unsigned int seed) { next = seed;}#endifmain.c#include <stdio.h>#include "r
C程序设计语言
2023-09-14
39 点赞
0 评论
59 浏览