35657

Untitled

Feb 2nd, 2024
1,054
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. // необходимо вывести все нечетные числа в диапазоне от 0 до 25
  6. int main() {
  7.  
  8.     setlocale(LC_ALL, "ru");
  9.  
  10.     for (int i = 0; i <= 25; i++) {
  11.         if (i % 2 == 0) {
  12.             continue; // переход на следующую итерацию
  13.         }
  14.         cout << i << " ";
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment