in reply to array in for loop

Can you provide us with more information about what you're trying to accomplish? While there is nothing in your code that is syntactically incorrect, there are some strange things in it and they're probably not doing what you expect. What we need to know is:

If you answer those questions, I'm sure we'll have no problem helping you. As it stands, I can't tell what the various variables in your code stand for.

Cheers,
Ovid

New address of my CGI Course.
Silence is Evil (feel free to copy and distribute widely - note copyright text)

Replies are listed 'Best First'.
Re: Re: array in for loop
by zonmoy (Initiate) on Feb 27, 2003 at 18:37 UTC

    What are you trying to accomplish?

    working on an assignment where I have to:

    • get data from the input file
    • calculate average of the test scores
    • lowest test score
    • highest test score
    • then sort by test score ascending order

    How are you trying to accomplish it? (that's apparently what we have above)

    see above

    What results are you expecting?

    the average of the scores is the average of the numeric input from file

    What results are you getting?

    the average of the scores is 0