Name: Anonymous 2012-10-14 0:12
Could someone please explain why these two codes give different results for the 'Grade' output. In the first code, it will give me all F's if i have an average of an F grade first. But the second code will return the correct Grade values if I use the same inputs.
The values I am using in both codes:
testOne: 50, 80, 70, 100
testTwo: 50, 80, 70, 100
Why is the code with specific array values {'A', 'B', 'C', 'F'} giving me the incorrect grade outputs?
Isn't saying average[i] = letterGrade[0], the same thing as assigning average[i] = 'A', if letterGrade[0] were to equal 'A'?
http://ideone.com/mSwRt
http://ideone.com/vI6ZU
The values I am using in both codes:
testOne: 50, 80, 70, 100
testTwo: 50, 80, 70, 100
Why is the code with specific array values {'A', 'B', 'C', 'F'} giving me the incorrect grade outputs?
Isn't saying average[i] = letterGrade[0], the same thing as assigning average[i] = 'A', if letterGrade[0] were to equal 'A'?
http://ideone.com/mSwRt
http://ideone.com/vI6ZU