Write a program that take input two strings from the user, you have to concatenate the strings and store the result in third string.
#include <iostream>
using namespace std;
int main()
{
cout << "Enter first string: ";
string firstString;
getline(cin, firstString);
cout << endl << "Enter second string: ";
string secondString;
getline(cin, secondString);
string thirdString = firstString + secondString;
cout << endl << "Output: " << thirdString;
return 0;
}
Comments
Leave a comment