Ex: If the input is:
345
the method digitCount() returns and the program outputs:
3
import java.util.Scanner;
public class LabProgram {/* TODO: Write recursive digitCount() method here. */public static void main(String[] args) {Scanner scnr = new Scanner(System.in);int num, digits;num = scnr.nextInt();digits = digitCount(num);System.out.println(digits);}}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here