Advertisement
Josif_tepe

Untitled

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