JAVA
Write a method that returns a specific digit of the irrational number square root of 2 (1.41421356237…) based on the user input.

For example, sqrtTwo(0) would return 1, and sqrtTwo(3) would return 4.

public static int sqrtTwo(int digit){
}

Respuesta :

Answer:

Answer is in the provided screenshot!

Explanation:

We square root 2, then parse that value as a String, we then strip the . from the string and turn it into an array by splitting each digit. We can then return value at the given point in the array

Ver imagen rainestormee
ACCESS MORE