- #1
- 95
- 0
Write a program that reads four-digit integer as a string , such as 1998 and then displays it, one digit per line, like so:
1
9
9
8
Attempt:
Scanner keyboard2 = new Scanner (System.in);
String integer2= "Input a 4 digit number:";
System.out.println(integer2);
How do I make it read ? How do I go about this using string method ? I am lost. Thanks
1
9
9
8
Attempt:
Scanner keyboard2 = new Scanner (System.in);
String integer2= "Input a 4 digit number:";
System.out.println(integer2);
How do I make it read ? How do I go about this using string method ? I am lost. Thanks