Computer Science, asked by arsowmyashree, 1 month ago

predict the output.
.
.
please answer fast​

Attachments:

Answers

Answered by anindyaadhikari13
1

Answer:

Output for the following program is,

81

3.0

Explanation:

It's given that,

a = 9, r=0.0d, m=1.

a% 2 != 0 is true as 9 divided by 2 leaves remainder 1 and not 0. Therefore, if block will execute.

➡ m = a * a = 81

➡ r = Math.sqrt(a) = √9 = 3.0

Now, values of m and r are printed.

So, output is,

81

3.0

Similar questions