Tens digit

Report a typo

Write a program that finds the tens digit in a non-negative integer N (0 ≤ N ≤ 1000000).

Take a look at the examples:

If N is 264, the tens digit is 6.

If N is 4136, the tens digit is 3.

If N is 101, the tens digit is 0.

Sample Input 1:

173

Sample Output 1:

7
Write a program in Java 17
import java.util.Scanner;

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// put your code here
}
}
___

Create a free account to access the full topic