Giving input as:
Input: 3 1 2 3 4 5 6 7 8 9 10 11 12 Expected Output: 1 2 3 4 5 6 7 8 9 10 11 12But it is giving the Output-
1 2 3 4 5 6 7Why it is not giving the last line ? Is there any mistake in my code?
#include <iostream>
#include<stdlib.h>
#include<string.h>
using namespace std;
int main() {
int t;
cin>>t;
while(t--)
{ string str;
getline(cin,str,'\n');
cout<<str<<endl;
}
return 0;
}