Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "Russian");
- int iter;
- cout << "Введите количество итераций: ";
- cin >> iter;
- unsigned value = unsigned(time(nullptr));
- for (int i = 0; i < iter; ++i)
- {
- cout << i << ") ";
- if (i % 13 == 0)
- {
- value = (value * 652651931 + 1132987654) % 100000;
- cout << value << endl;
- }
- else if (i % 3 == 0)
- {
- value = (value * 732129 + 239111221) % 100000;
- cout << value << endl;
- }
- else
- {
- value = (value * 654112 + 95121321) % 10000;
- cout << value << endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement