Commit 8c8cc777 by 李楚霏

练习1

parent b908c412
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
int size = 20;
char firstname[size];
char lastname[size];
// char ch = '';
cout << "enter your first name:" << endl;
(cin >> firstname).get();
// cin.get();
cout << "enter your last name:" << endl;
(cin >> lastname).get();
cout << "Here's the information in a single string:" << strcat(strcat(firstname, ","), lastname);
return 0;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment