#include<iostream>
#include<cstring>
using namespace std;
int main() {
    int t;
    cin >> t;
    string s;
    getline(cin, s);
    cout << s;
    return 0;
}
As soon as I press the enter key after giving input for t, the program terminates as string takes the newline character as input. What can I do? I cannot output something between these two inputs and an enter after t is mandatory.
 
     
    