cpp_primer_plus/ch04/04.cpp
2022-08-25 00:44:15 +01:00

15 lines
321 B
C++

# include <iostream>
# include <string>
using namespace std;
int main(){
string f_nm, l_nm, nm;
cout << "Enter your first name: ";
getline(cin, f_nm);
cout << "Enter your last name: ";
getline(cin, l_nm);
nm = f_nm + ", " + l_nm;
cout << "Here is the information in a single string: " << nm << endl;
return 0;
}