Code problem in triplets

what is the issue in my code. compiler is showing wrong answer. its working well on my machine

@hemantomer1
Your code is correct but there is mistake while printing output (i.e line 25). You missed one space after comma.So change line 25 to cout<<x<<", “<<arr[j]<<” and "<<arr[k]<<endl;