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

I need help, please also help with the other
What can happen to an ecosystem (and its carrying capacity) if the food is destroyed?
In the standard (x,y) coordinate plane a right triangle has vertices at (-3,4)(3,4)(3,-4) what is the length in coordinates units of the hypotenuse of this tria
can yall plz follow me tik demon alchemist
Given that AlHJ is equiangular, find x and y. A. X = 57, y = 54 B. X = 57, y = 63 C. X = 66, y = 54 D. x = 66, y = 55
Soviets believed that the U.S was trying to take control over Eastern Europe. True False
Find the area of the region in blue. Round to the nearest whole number.
What is the center of the circle x2 + y2 - 13x – 22 =0
Who are the Calpolli like in Asia?
List one Jim Crow law that existed in the state Ohio