前言 在编写程序的情况下免不得需要生成随机数,现在提供一个简单的方法 程序 #include<iostream> #include<ctime> //把日期和时间转换成字符串 #include<windows.h> using namespace std; int main() {