关闭

Exericse 4.1

275人阅读 评论(0) 收藏 举报
分类:
#include<iostream>
using namespace std;
int main()
{
    const int ArSize = 20;
    char firstname[ArSize];
    char lastname[ArSize];
    char mark;
    int age;

    cout << "What is your first name?";
    cin.getline(firstname,ArSize);
    cout << "What is your last name?";
    cin.getline(lastname,ArSize);
    cout << "What letter grade do you deserve?";
    cin >> mark;
    cout << "What is your age?";
    cin >> age;
    cout << "Name:" << lastname << ", " << firstname << endl;
    mark++;
    cout << "Grade: " << mark << endl;
    cout << "Age: " << age << endl;
    return 0;
}

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:36393次
    • 积分:978
    • 等级:
    • 排名:千里之外
    • 原创:56篇
    • 转载:63篇
    • 译文:0篇
    • 评论:1条
    文章存档
    最新评论