C++程序 给出一百分制成绩,要求输出成绩等级‘A’,‘B’,‘C’,‘D’,‘E’.90分以上为‘A’

C++程序 给出一百分制成绩,要求输出成绩等级‘A’,‘B’,‘C’,‘D’,‘E’.90分以上为‘A’
给出一百分制成绩,要求输出成绩等级‘A’,‘B’,‘C’,‘D’,‘E’.90分以上为‘A’,80~89分为‘B’,70~79分为‘C’,60~69分为‘D’,60分以下为‘E’.
求速回
#include
using namespace std;
void main()
{
x05coutx;
if (x100)
x05x05cout
橘子巨巨 1年前 已收到1个回答 举报

2047A 幼苗

共回答了16个问题采纳率:93.8% 举报

有几个问题,x后边的分号是中文字符main函数是void,不用return 0;另外,根据题意,应该在90,80等判定时有等号#include
using namespace std;
void main()
{
cout<<"write your mark here fool";
int x;
cin>>x;
if (x<0||x>100)
cout<<"your number is wrong";
else if (x>=90)
cout<<"A";
else if (x>=80)
cout<<"your score belong to B";
else if (x>=70)
cout<<"C";
else if (x>=60)
cout<<"D";
else cout<<"shit you got a E";
//return 0;
}

1年前

7
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.459 s. - webmaster@yulucn.com