Question 3
a) What will be the output of the following program segment?
int X = 1000, Y = 9, Z = 5;
do
X = X/Y;
Z=Z++ + 1;
} while (Y <=X);
System.out.println (“Z="+Z);
Answers
Answered by
4
Answer:
X=1000/9;
X = 111.111
Z=5+1;
Z=6
Similar questions