Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This program will be compiled on Ubuntu 18.10 with g++ (Ubuntu 8.2.0-7ubuntu1) 8.2.0
- #include <iostream>
- #include <random>
- #define SHANGHAI 0 //上证指数2018年11月15日收盘值*100
- #define SHENZHEN 0 //深证成指2018年11月15日收盘值*100
- int main()
- {
- std::random_device rd;
- std::mt19937 eng(SHANGHAI + SHENZHEN);
- std::uniform_int_distribution<> distr(1, 183);
- for (int i = 0; i < 20; i++)
- {
- std::cout << distr(eng) << std::endl;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment