How to put multiple test cases?

Mulltiple test cases in each line , looping

hello @reshusinghhh
put ur logic inside while or for loop .
and run that loop for t number of times (here t is number of test cases).

Ok I put that and checked with the given test case , giving expected output, but when submitting its saying test case failed

print output for each test cases in separate line .
by adding cout<<"\n" in the last of ur logic.

Ya done that too , put endl

https://ide.codingblocks.com/s/307128 - code is here

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.