c语言编程,根据分数划分成绩#include "stdio.h"#include "conio.h"void main(){int score;scanf("%d,&score");if(score60 || score==60) && score70 || score==70) && score80 || score==80) && score
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/17 15:38:32
![c语言编程,根据分数划分成绩#include](/uploads/image/z/9331946-26-6.jpg?t=c%E8%AF%AD%E8%A8%80%E7%BC%96%E7%A8%8B%2C%E6%A0%B9%E6%8D%AE%E5%88%86%E6%95%B0%E5%88%92%E5%88%86%E6%88%90%E7%BB%A9%23include+%22stdio.h%22%23include+%22conio.h%22void+main%28%29%7Bint+score%3Bscanf%28%22%25d%2C%26score%22%29%3Bif%28score60+%7C%7C+score%3D%3D60%29+%26%26+score70+%7C%7C+score%3D%3D70%29+%26%26+score80+%7C%7C+score%3D%3D80%29+%26%26+score)
c语言编程,根据分数划分成绩#include "stdio.h"#include "conio.h"void main(){int score;scanf("%d,&score");if(score60 || score==60) && score70 || score==70) && score80 || score==80) && score
c语言编程,根据分数划分成绩
#include "stdio.h"
#include "conio.h"
void main()
{
int score;
scanf("%d,&score");
if(score60 || score==60) && score70 || score==70) && score80 || score==80) && score
c语言编程,根据分数划分成绩#include "stdio.h"#include "conio.h"void main(){int score;scanf("%d,&score");if(score60 || score==60) && score70 || score==70) && score80 || score==80) && score
#include
main()
{
int score;
printf("输入分数:\n");
scanf("%d",&score);
score=score/10;
switch(score)
{
case 10:
case 9:printf("the score is A\n");break;
case 8:printf("the score is B\n");break;
case 7:printf("the score is C\n");break;
case 6:printf("the score is D\n");break;
case 5:
case 4:
case 3:
case 2:
case 1:
case 0:printf("the score is E\n");break;
defaule:printf("Input error");
}
}
另外我想说,用
if
else if
句式时
else if表示当之前if条件不成立时再进行判断,
例如
if(score