编写C++程序实现输入个人基本信息姓名+性别+年龄+性别并输出。
#include
using namespace std;
int main() { string name, gender; int age;
cout << "请输入您的姓名:";
getline(cin, name);
cout << "请输入您的性别:";
getline(cin, gender);
cout << "请输入您的年龄:";
cin >> age;
cout << "您的基本信息如下:" << endl;
cout << "姓名:" << name << endl;
cout << "性别:" << gender << endl;
cout << "年龄:" << age << endl;
return 0;
}
原文地址: https://www.cveoy.top/t/topic/eKSO 著作权归作者所有。请勿转载和采集!