What will be the output of the following coded segment if x = 10 and y = 20? if(x%10 == 0 || y <= x/2) { if (y%20 < 0)

Status
Not open for further replies.

Konex_

Commendable
Sep 5, 2016
1
0
1,510
What will be the output of the following coded segment if x = 10 and y = 20?

if(x%10 == 0 || y <= x/2)
{
if (y%20 < 0)
{
x++;
x = y%10 + y/2;
cout << "X = ” << x++;
}
else
{
x = x-- + ++y - y%5;
cout << "\nX = ” << x--;

if(x >= y)
{
x++;
y = x * 2 + y;
cout << "\nY = ” << y;
}
}
}
 
We wouldn't be doing you any favours by helping you with your homework. the Internet has the answers to everything but you're better off researching your problem properly rather than asking the direct question.

Another point it that there are Trolls who would give you the wrong answer for what they see as fun.
 
Status
Not open for further replies.