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

A submarine at the surface dives 650 ft and then another 125 ft. Express the final depth as an integer.
93 divided by 3 using repeated subtraction
LINDNER.. And at the moment the overwhelming majority of our people [in Clybourne Park] feel that people get along better... when they share a common background
The transfer of energy between algae and herbivores is about
Here are three possibilities: to read to listen to exercise
Graph two more functions in the same family for witch the parameter being changed is the y-intercept, b
How did instability in French government create an opportunity for Napoleon to take power
witch tip provides the best support in writing a first draft?A.)try to follow your outline as closely as possible.B.)wait to cite your sources until the very en
A(n) __________ is a whirling storm that forms over the ocean in tropical regions.
generally speaking the blank the risk the blank the potential return or loss