1:代码如下:

// 3.12.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include <iostream>
using namespace std;
void main()
{
cout<<"输入一个A-D范围内的大写字母作为成绩评价"<<endl;
    char iInput;
    cin >> iInput;
    if(iInput == 'A')
    {
        cout << "very good" <<endl;
        return ;
    }else if(iInput == 'B')
    {
        cout << "good" <<endl;
        return ;
    }else if(iInput == 'C')
    {
        cout << "normal" <<endl;
        return ;
    }else if(iInput == 'D')
    {
        cout << "failure" <<endl;
        return ;
    }else
    cout << "input error" << endl;
}
View Code

相关文章:

  • 2022-12-23
  • 2021-05-06
  • 2022-12-23
  • 2021-05-02
  • 2022-01-13
  • 2022-12-23
  • 2021-04-26
  • 2021-06-08
猜你喜欢
  • 2022-01-02
  • 2022-01-08
  • 2022-12-23
  • 2021-05-28
  • 2021-12-04
相关资源
相似解决方案