Search:

Type: Posts; User: GregBrannon

Search: Search took 0.08 seconds.

  1. Replies
    5
    Views
    1,309

    [SOLVED] Re: Code Simplification

    Good job! In summary, add the results of each loop to a String object and output the completed String object after exiting the loop.
  2. Replies
    5
    Views
    1,309

    [SOLVED] Re: Code Simplification

    You could use an if statement to record the correct data based on the value of the for loop's control variable, but that's almost (not quite) as much trouble as repeating the same code 3 times.
  3. Replies
    5
    Views
    1,309

    [SOLVED] Re: Code Simplification

    Have you learned arrays yet? Maybe it doesn't matter.

    Anytime you're repeating the exact same code, you should wonder, "How can I put this in a loop?" or "How can I write a method to do this?" ...
Results 1 to 3 of 3