Advertisement
Josif_tepe

Untitled

May 22nd, 2024
539
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. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int i, a, b;
  7.     a = 0; b = 0;
  8.     for(i = 1; i <= 10; i += 2)
  9.         a = a + i;
  10.         b = b + i;
  11.     cout << a << endl;
  12.     cout << b << endl;
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement