QUOTE=Banfa][code]
if (grade>= 90)
letter_grade = 'A';
[/codeif is a statement NOT a function
What you have here is a complete if statement, it needs no closing, note I have corrected your string constant to a character constant and made your variable name valid.
If you want to execute more than 1 line of code when the condition is true then put in braces and have an if block
-
if (grade>= 90)
-
{
-
letter_grade = "A";
-
totalA++;
-
}
-
You did not show code extending to 'F' so it is a little hard to know what you mean however are you talking about if - else if - else
-
if (grade>= 90)
-
{
-
letter_grade = 'A';
-
}
-
else if (grade>= 80)
-
{
-
letter_grade = 'B';
-
}
-
else
-
{
-
letter_grade = 'F';
-
}
-
[/quote]
Thank you for you taking time out to guide me in the right direction. I am using Visual Studio 6.0, and I was unclear to write the statement so that it is recognize, you hit on the nose with the rest of the code you provided. I just do not know what shoud I start with before letter grade or IF .