Advertisement
Josif_tepe

Untitled

Nov 3rd, 2023
644
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int x = 1;
  7.    
  8.     while(x <= 50) {
  9.         if(x % 2 == 0) {
  10.             cout << x << endl;
  11.         }
  12.         x += 1;
  13.     }
  14.    
  15.     return 0;
  16. }
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement