Answer :
Answer:
Code in C++
Explanation:
#include<iostream> //for input and output
#include<string>
using namespace std;
int main()
{
string firstStatement;
string secondStatement;
cout<<"Enter your first statement :";
getline(cin,firstStatement);
cout<<"Enter your second statement :";
getline(cin,secondStatement);
cout<<firstStatement<< " "<<secondStatement;
return 0;
}
Code Explanation
To get string as an input, program should include string package.
Firstly we need to declare 2 strings for 2 statements. then by using getline method exists in string package, we can get string from user input.
Then to show the concatinated output of both statement we can use cout phrase.
Output
Case 1:
Enter your first statement :Hello
Enter your second statement :World
Hello World
Case 2:
Enter your first statement :Today is
Enter your second statement :Sunday
Today is Sunday