Question: A 4 digit number has 1 digit each in the thousands, hundreds, tens, and units position. For example, 5327 has 5 in the thousands
A 4 digit number has 1 digit each in the thousands, hundreds, tens, and units position. For example, 5327 has 5 in the thousands position, 3 in the hundreds position, 2 in the tens position, and 7 in the units position. Write a Java program that takes exactly a 4 digit number and prints the number of thousands, hundreds, tens and units. Sample Output: Enter a 4 digit number: 5327 Thousands: 5 Hundreds: 3 Tens: 2 Units: 7
Step by Step Solution
There are 3 Steps involved in it
Answer Create file DigitPlacesjava import javautilScanner public class DigitPlaces public static voi... View full answer
Get step-by-step solutions from verified subject matter experts
