Okay Im a newbie and Im working on a program that allows the user to enter a grade (0-100) and then the console returns to the user the grade and the letter of the grade. This is what i have and so far I have only programmed grades 70 and up. Here's my problem: if the grade is 90 or above, the console displays "A".. which is fine. But when I enter a grade that is less than 90 and above 80, the console displays "AB".. then when I enter a grade above 70 and less than 80 the console displays "ABC".. this program is supposed to return grades, not teach me my ABCs. Please help and let me know if I am approaching this program completely wrong. Here's what I got:
just leave that away. since it is useless. and you shouldn't use a , for the if's: (grade >= 80, grade < 90)
should become (grade >= 80&& grade < 90)
EDIT: actually just leave second part away and use else if statements like this: