Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- //srand(static_cast<unsigned int>(time(NULL)));
- srand(time(NULL));
- std::vector<int> x(20, 0);
- for (auto &v : x)
- {
- v = rand() % 3 + 1;
- std::cout << v << " ";
- }
- cout << std::endl;
- for (const auto &v : x)
- {
- std::cout << v << " ";
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement