#include "stdafx.h"
#include "iostream"
#include "windows.h"
#include "string"
#include "cstring"
using namespace std;
int main(int argc, char* argv[])
{
char name[21],ch[21];
int age;
cout<<"Please enter your name : \n";
cin.get(name,20).get();
cout<<"Please enter your mother's name : \n";
cin.get(ch,20);
cout<<"Please enter your age : \n";
cin>>age;
cout<<"Your name is "<<name<<" Your mother's name is "<<ch<<" your age is "<<age<<endl;
system("pause");
return 0;
}
字符串输入输出cin.get的用法
最新推荐文章于 2024-09-29 12:19:08 发布