Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void vtor(std::vector <int> poslos)
- {
- int res1 = 0;
- int res2 = poslos.at(0);
- for (int i = 0; i < poslos.size(); i++)
- {
- if (poslos.at(i) == perv(poslos.at(i)))
- {
- res1++;
- if (poslos.at(i) < res2)
- {
- res2 = poslos.at(i);
- }
- }
- }
- std::cout << "\n (2 зад.) Количество подходящих чисел: " << res1 << "\n (2 зад.) Наименьшее среди этих чисел: " << res2 << "\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement