what's wrong with this statement? I keep getting parse errors.
Note: The variable q1 refers to a 'char' variable, declared as follows:
Code:
if (q1=='y') or (q1=='Y')
printf("Correct!");
i've also tried adding braces..
Code:
if (q1=='y') or (q1=='Y')
{
printf("Correct!");
}
and i've even tried without the parenthesis..
Code:
if q1=='y' or q1=='Y'
printf("Correct!");
I just had this working!! I messed around with it a little, re-wrote it, and now I'm getting parse errors. Is it something i'm not seeing?
Anyone know of a few code examples that use conditionals with operators? (and, or, not)