I need help on how to determine the average of the test scores... if a -1 is entered for a test score grade it's an absence (so it should be ignored).. I know how to write this program if it's not in loop format, but because of the for loop, I don't know how to calculate the average and tell the program to ignore the -1 (I can't distinguish each test score, as var test1, test2, etc). For example, if the test scores are -1, 90, 80, 90. The calculation would be (90+80+90)/3 ... if there's two -1's then the grade is automatically an I.
What am I doing wrong?? It's not calculating correctly. It's the //Calculate the average part I need help with.