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

8 1/2 divided by 1/4
How do you predict a child's future height?
Why should we study geography?
A declarative sentence makes a _______ and ends with a period
In 1992, _____________ led a committee on the new topical issue of corporate governance. answer a. daniel everton b. mervyn king c. alexander elkins d. adri
a garden plot is to contain 240 sq. ft. if its length is to be 3 times its width,what should its dimensions be?
What is the algebraic rule?
how is the male reproductive system different from other body systems? it isn’t necessary to vital signs. it monitors other body systems, and adjusts if necessa
11 more than 5 of a certain number is twenty more than 2 times of that number. What is the number?
discuss how the use of pedometers benefited people at