23-三目运算符的嵌套使用

来源:互联网 发布:查看oracle数据库oid 编辑:程序博客网 时间:2024/05/21 10:37
#include "stdio.h"#include "conio.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);  getch();}

0 0
原创粉丝点击