Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a, b, x, y;
- x = 0; y = 0;
- a = 2; b = 3;
- do
- {
- x = x + a;
- y = y + b;
- a++;
- } while(a <= b);
- cout << x << endl;
- cout << y << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement