It didn't take the input correctly using getline(cin,s).It takes 1st input as empty space.can anyone please solve this for example code is
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
int t;
cin>>t;
for(int i=0;i<t;i++)
{
string s;
getline(cin,s);
cout<<s<<endl;
}
}
if input is: 5 In keyboard the keys are arrange in the order qwertyuiopasdfghjklzxcvbnm and Welcome to CODE COMBAT hffoufcutjcufvhk iuhiogu upug sngkn rkgnf fhg ogi goijng dfoghgreh f fofhh
the ouput is:
In keyboard the keys are arrange in the order qwertyuiopasdfghjklzxcvbnm and Welcome to CODE COMBAT hffoufcutjcufvhk iuhiogu upug sngkn rkgnf fhg ogi