Computer Science, asked by tanyavarshney15, 1 month ago

Write valid Java statements for the following:
(i) To store the square root of num.
(ii) To print the 3 raised to the power 4.
(iii) To print two integers x,y in the same line.


Please answer it fast..

Answers

Answered by BrainlyProgrammer
10

Required Answer:-

(i) Store Square root of variable 'num'

  • double k=Math.sqrt(num);

(ii) Print 3^4

  • System.out.println(Math.pow(3,4));

(iii) Print 2 integers in same line

  • System.out.print(x+" "+y);
Similar questions