Computer Applications
Which of the following does not find the square of a number?
- Math.pow(a,2)
- a*a
- Math.sqrt(a,2)
- a**2
Input in Java
25 Likes
Answer
Math.sqrt(a,2) and a**2
Reason ā Math.sqrt(a,2) finds square root of the number. a**2 is an invalid expression in Java. It will cause a syntax error.
Answered By
11 Likes
Related Questions
For which of the following purposes, the Scanner class is used?
- To display a value
- To find square root of a number
- To input a value
- To find maximum of two numbers
Which of the following statements is true for nextDouble( )?
- It accepts an integer type value
- It accepts a double type value
- It accepts a float type value
- It accepts a long type value
What type of value is returned by Math.sqrt( )?
- int
- float
- double
- long
Which of the following functions will find the square root of a number 'a'?
- sqrt(a)
- Math.sqrt(a)
- Squareroot(a)
- āa