Describe what the code needs to have to do that.
The code needs to know if it has found a digit or not. A boolean variable can be used to remember that.
Type: Posts; User: Norm
Describe what the code needs to have to do that.
The code needs to know if it has found a digit or not. A boolean variable can be used to remember that.
How will the code know if a white space should stop the printing or not? There will be lots of white spaces in the String.
I'm not sure what that means. Can you explain a little more?
Is that all? That logic will print ALL of the digits in the String? That is what the current code does.
Don't you want to stop printing digits after the first non-digit is found following some...
Ok that's one part,
then what does it do next:
if it is a digit
if it is NOT a digit
and then what after that
Have you worked out the logic that the code needs to implement?
List the steps the code needs to take to solve the problem.
Here's a start:
ask user for input
read input into a String
loop...
Post the new version of the code and explain what the problem is. Post the program's output and add some comments showing what it should be.