String Window problem


it is giving wrong output in testcase 3 and 8.

change line 9 to getline(cin,s2);
S2 string also consist space so cin won’t work.