Advertisement
Josif_tepe

Untitled

May 21st, 2024
874
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 a, b, x, y;
  7.     x = 0; y = 0;
  8.     a = 2; b = 3;
  9.     do
  10.     {
  11.         x = x + a;
  12.         y = y + b;
  13.         a++;
  14.     } while(a <= b);
  15.     cout << x << endl;
  16.     cout << y << endl;
  17.  
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement