OK, you have code to show a letter grade. What exactly is wrong with the results it gives you?
Maybe you are getting multiple letter grades? Eg if the grade is 80 then it will pass the if tests on lines 43, 46, 49, 52 and 55. Have a look at "else if" rather than "if" and see how that can help you stop processing subsequent if tests once you have passed one of them.
JamesCherrill
... trying to help
8,533 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,456
Skill Endorsements: 30
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
LetterGrade has not been initialized??
Assign it a value when you define it. Variables defined inside of methods need to be assigned values.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Assign it a value when you define it. Variables defined inside of methods need to be assigned values.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Please post what the program outputs, describe what is wrong with it and show what you want the output to look like.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Question Answered as of 8 Months Ago by
NormR1,
Starstreak
and
JamesCherrill