Computer Science, asked by Dhyani7149, 9 months ago

If x=20,y=10,z=5 x++ y-- z++ what is the output

Answers

Answered by ilKingg
0

If you inputted that code in a java programming environment, it would be a syntax error. Also there is no output code written for the program.

The answer would be:

x = 21;

y = 9;

z = 6;

If you wanted to write it is a java program, here is the code:

int x = 20;

int y = 10;

int z = 5;

x++;

y--;

z++;

System.out.println(x);  //21

System.out.println(y);  //9

System.out.println(z);  //6

Similar questions