怎么编写随机数

3 comments

  • @ 2024-8-25 11:17:04

    HAHA

    的确“万能”

    • @ 2024-8-25 11:05:46

      e……

      #include <bits/stdc++.h>
      using namespace std;
      int main()
      {
          for (long long i=1;;i++)
          {
          	srand(time(0));
      		long long x=rand();
      		cout << x*i;
          }
          return 0;
      }
      
      • @ 2024-8-19 13:02:35

        C++

        srand(time(0));
        int x=rand();
        cout<<x;
        

        就懒得写头文件了

      • 1