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

If the circumference is 34.54 what is the radius?
state three advantages of rusting​
are you cynical? why or why not
What is the summary for the lady of shallot
how many 2/3 are in 6.
(1) Find the unknown side length of the rectangle if its area is 11 m squared.
Out of all of these choices put them in strongest impact to runaway slaves to the least. Why did you choose the first choice as your first?Kansas-Nebraska ActMi
nancy goes fishing with Jason. they catch 14 trout if they equally split up trout how many will each one get
5) Tara wants to weigh her three stuffed animals. They will only fit on the scale two at a time. Together Addie and Missy weight 18 ounces. Missy and Corky weig
-> Which expression is equivalent to -3z + 17 – (-152) - (-4)? -12z + 13 18z + 21 -18z + 13 12z + 21