Separate the digit in an Integer (User-Input)
<p>How do I enter a digit like '23423' and output it like '2 3 4 2 3'? And how do I make it so that user cannot enter less or more than 5-digits?
(Your help would be appreciated. I just need hints from you guys since I'm learning Java. Looking forward to learn something new.)</p>

<p>This is what I have so far:</p>

<pre><code>    Scanner input = new Scanner(System.in);

    int value1, value2, value3, value4, value5;

    System.out.print("Enter a number: ");
    value1 = input.nextInt();

    System.out.print("Enter a number: ");
    value2 = input.nextInt();

    System.out.print("Enter a number: ");
    value3 = input.nextInt();

    System.out.print("Enter a number: ");
    value4 = input.nextInt();

    System.out.print("Enter a number: ");
    value5 = input.nextInt();

    System.out.printf(" %d " + " %d " + " %d " + " %d " + " %d\n ", value1, value2, value3, value4, value5);
</code></pre>
