Search:

Type: Posts; User: Junky

Search: Search took 0.09 seconds.

  1. Replies
    15
    Views
    1,519

    Re: What is wrong with this code?

    Since the variable c is a String that won't work.

    Already covered and solved.

    Declared on the first line of the main method.

    The problems continue.

    6. Where do you store the values...
  2. Replies
    15
    Views
    1,519

    Re: What is wrong with this code?

    Each to his/her own. If I see problems in the code then I will alert the person to all of them rather wasting my time doing all this back and forth dealing with one issue at a time.
  3. Replies
    15
    Views
    1,519

    Re: What is wrong with this code?

    So your plan is to have OP fix one problem at a time and then when they encounter the next to come back here and post their code, ask some vague question (as most do) and then fix that one. Rinse and...
  4. Replies
    15
    Views
    1,519

    Re: What is wrong with this code?

    Just realised there is a 4th problem

    4. The average is never calculated and displayed.

    Even more

    5. Wrong return type for the average method.
  5. Replies
    15
    Views
    1,519

    Re: What is wrong with this code?

    No there are 3 issues and they are all very real.

    1. The correct condition in the if statement
    2. The correct condition in the loop
    3. How to exit when user enters "n"
  6. Replies
    15
    Views
    1,519

    Re: What is wrong with this code?

    I'm still not 100% awake yet but shouldn't the condition be while(flag > 0). If the user enters "y" to continue and you increment flag by 1 (assuming this gets fixed) then flag will be greater than...
Results 1 to 6 of 6