/***************************************************************编写一个c++程序,如下述输入事例所示的那样请求并显示信息:what is your first name? Betty Suewhat is your last name? Yewewhat letter grade do you deserve? Bwhat is your age? 22Name:Yewe,Betty SueGrade:CAge:22注意:该程序应该接受的名字包含多个单词。另外,程序将向下调整成绩,即向上调一个字母。假设用户请求A、B或C,所以不必担心D和F直接的空档。******************************************************************/#include<iostream>using namespace std;int main(){ cout << "what is your first name? " ; char first_name[200]; cin >> first_name; cout << "what is your last name? " ; char last_name[100]; cin >> last_name; cout << "what letter grade do you deserve? " ; char letter; cin >> letter; int a = letter; //向下调整成绩 a++; letter = a; cout << "what is your age? " ; int age; cin >> age; cout << "Name: " << last_name << "," << first_name << endl; cout << "Letter: " << letter << endl; cout << "Age: " << age << endl; system("pause");}
1 回答
- 1 回答
- 0 关注
- 1277 浏览
添加回答
举报
0/150
提交
取消