alnaceniniya alnaceniniya
  • 21-06-2020
  • Computers and Technology
contestada

predict the output
the following is a segment of program
x=1 y=1
if (n>0)
{
x=x+1
y=y+1
}
what will be the value of x and y if n assumes a value
1 , 0

​

Respuesta :

atolagbeoluwasegun
atolagbeoluwasegun atolagbeoluwasegun
  • 22-06-2020

Answer:

If n is 0, then nothing happens because m is not greater than 0.

If n is 1, then x is 2 and y is 2.

Explanation:

The if condition is true (1>0), so x becomes 1+1 and y becomes 1+1.

Answer Link

Otras preguntas

Please can some one explaine fore me What is work done
??? What is Continuing Education?
what is answer to 12=4x what is x
What are the Buddhist teachings?
Which of the following is a simile? a. The blood was alive, like the dog. b. No matter how fast he runs, the wet feet Will freeze the harder. c. He should no
which of the following is a risk specific to online gaming?A. chatting with people you don't knowB. role-playingC. personal powerD. community building
find the sum of 12.56 and 45.89
find the sum of 12.56 and 45.89
How much force is needed to move a box to an acceleration of 1.5 m/s^2 and a mass of 50 kg?
Convert y=x squared +64x + 12 into graphing form