条件运算符的嵌套

来源:互联网 发布:电视直播apk软件下载 编辑:程序博客网 时间:2024/05/07 03:00
int main(){int score;printf("enter the score: ");scanf("%d", &score);printf("the grade is %c!\n", score >= 90 ? 'A' : (score >= 60 ? 'B' : 'C'));return 0;}

0 0