Computer Science, asked by BMsingpho5899, 9 months ago

int a = 0;
if(a>0 && a<20)
a++; else
a -- ; System.out.println(a);
What will be the output?

Answers

Answered by IamGenesis
41

Answer:

-1

Explanation:

since a is not greater than 0, the else part will be executed....in that part the value of a is decreased by 1......so, a is -1

Answered by somalia31
11

Answer:

-1 is the correct answer

please mark me the brainliest

Similar questions