Advertisement
Josif_tepe

Untitled

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