Nested Loops Study Help Needed
I tried to search for any relative threads but as I'm new to Java I have no clue what would be closest to my following issues:
I've been experimenting and self-teaching myself and I've learned a lot about the construction of methods and statements. But sadly, I'm not too bright when it comes to combining both logic and math inside java.
I'm having trouble in figuring out how to use for loops inside nested while loops, while I'm practicing I'm trying to achieve something similar to:
Enter the next number: 4 [enter]
Enter the next number: 14 [enter]
That is an invalid number.
Enter the next number:
I'm clueless about how to break the number 4 into 1 2 3 4 and convert 1 2 3 4 into $$$$.
After this, the program should ask the user to input another integer and repeat the same thing as above till the user has typed in 5 integers then the program shows the output as symbols.
The other experiment is to create a code that writes a line of asterisks depending on the value of a number. Say that I have an int = 1900; , and I want to divide it by 100, and for every 100 is one asterisk so it would show *******************. This experiment is the same as the first, as I'm trying to convert numbers into symbols according to given data.
I currently don't have any code to provide as I'm struggling with the logical sense of constructing it.
Your help will be very much appreciated, as it will give me some mind peace lol. Thank You