# 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
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;
}
}
}

#### Saga Lout

##### Olde English
Moderator
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.
Apps General Discussion 2
Apps General Discussion 5
Apps General Discussion 3
Apps General Discussion 1
Apps General Discussion 2
Apps General Discussion 1
Apps General Discussion 2
Apps General Discussion 1
Apps General Discussion 1
Apps General Discussion 4
Apps General Discussion 2
Apps General Discussion 1
Apps General Discussion 3
Apps General Discussion 1
Apps General Discussion 2
Apps General Discussion 7
Apps General Discussion 2
Apps General Discussion 5
Apps General Discussion 2
Apps General Discussion 1