Output question

closed account (zTUSz8AR)
What is the output of the following C++ code?

1
2
3
4
5
6
7
8
9
10
11
12
13
int x = 5; 
int y = 12; 
if (x + y > 20 || y – x < 10)
{ 
x = y + 6;
y = 2 * (x + y);
cout << x << " " << y << " " << x - y << " " << x + y << endl;
} 
else 
{ 
y = (5 * x + 20) % y;
cout << x << " " << y << " " << x * x + y * y << endl;
}
How about you compile it and see for yourself?
Topic archived. No new replies allowed.