#include <iostream> using namespace std; #include <stdlib.h> #include <time.h> int main() { int i; srand((unsigned)time(NULL)); //初始化随机数种子 for (i=0; i<10; i++) //产生10个随机数 { cout<<rand()<<"/t"; } cout<<endl; return 0; }
Powered by: 博客园 Copyright © 2024 Bill Yuan Powered by .NET 8.0 on Kubernetes