Computer Science, asked by Adityk17, 11 months ago

State the output of the following function :
public void show()
long y = 838383, n = y, p, s;
while( n>0)
p= n % 10;
System.out.println( Math.pow(p, 2));
n= n/100;
System.out.println( y );​

Attachments:

Answers

Answered by varadhabala29
1

Answer:

9

838383

Explanation:

The value of p is 3 as the rightmost digit of n is 3. The square of 3 is 9 and thus is printed in a line. Now, the value of n is divided by 100. This makes the value of n as 8383. Now, y is printed.

Similar questions