How do i print int num1; a 5 digit number like 1 2 3 4 5
ive been working this daxm problem for like 1-2 hours and cant get it to print
i dont want an answer i want a hint on what to do i want to work it trial and error my self so i learn it. I still have to make sure the num1 does not < 99999 or > 9999 but i think i know how to do that.
import java.util.Scanner;
public class Figure230
{
public static void main( String args[] )
{
Scanner input = new Scanner( System.in );
// This is where my integer is only one lonley guy
int num1;
System.out.print( "Please enter a five digit number:" ) ;
num1 = input.nextInt();
System.out.printf( " %d", num1 ); // it needs to display the 5 digits
//num with 3 space between each num.
}
}
would a couple more %d do the trick when i add another %d i get a error on compile
thanks