0

Separating digits in an integer with 3 spaces

(Separating the Digits in an Integer) Write an application that inputs one number consisting of five digits from the user, separates the number into its individual digits and prints the digits separated from one another by three spaces each. For example, if the user types in the number 42339, the program should print: 4 2 3 3 9. Assume that the user enters the correct number of digits. What happens when you execute the program and type a number with more than five digits? What happens when you execute the program and type a number with fewer than five digits. [You’ll need to use both division and remainder operations to "pickoff” each digit.] This is an exercise from the chapter 2 of Deitel Deitel (Java Programming). This problem is to be solved without going beyond if, else statement, mathematical, equality and relational operators. The screenshot of the problem will be found in my profile. Thanks

29th Mar 2019, 6:38 PM
Sol
Sol - avatar
2 Answers
+ 1
Please post assignments in the Lesson Factory. https://www.sololearn.com/discuss/1316935/?ref=app
29th Mar 2019, 9:40 PM
Diego
Diego - avatar
0
it's good example
16th Nov 2019, 1:07 PM
Syerwe Gkjl Gdf
Syerwe Gkjl Gdf - avatar