Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Re: URGENT HELP NEEDED IN AN HOUR:Printing first number in input

    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.
  2. Re: URGENT HELP NEEDED IN AN HOUR:Printing first number in input

    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.
  3. Re: URGENT HELP NEEDED IN AN HOUR:Printing first number in input

    I'm not sure what that means. Can you explain a little more?
  4. Re: URGENT HELP NEEDED IN AN HOUR:Printing first number in input

    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...
  5. Re: URGENT HELP NEEDED IN AN HOUR:Printing first number in input

    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
  6. Re: URGENT HELP NEEDED IN AN HOUR:Printing first number in input

    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...
  7. Re: URGENT HELP NEEDED IN AN HOUR:Printing first number in input

    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.
Results 1 to 7 of 7