error please correct

#include(stdio.h)
main()
{
int score;
char grade;
printf("please input a score\n");
scanf("%d",&score);
grade=score>=90?'A'score>=60?'B':'C');
printf("%d belongs to %c",score,grade);
}
Q,E,D I don't know which row is wrong, please help and I am novice.
#include must use <> or "".
 
#include <stdio.h> 


There are a couple of problems with line 8:
- You have an unbalanced parenthises.
- You're missing the colon in the first ternary opeator
It should be:
grade=score>=90?'A' : (score>=60?'B':'C');

PLEASE USE CODE TAGS (the <> formatting button) when posting code.




Ops, sorry. And the problem is denote a number as A,B,C. Greater than 90, A. And less than 60, B and C.
The first line is wrong. should be #include <stdio.h>

The conditional statement requires brackets, like this: (score>=90)
Topic archived. No new replies allowed.