What is the wrong in the code

Hi @17manishms


here is d corrected code.
1)apply for loop till i<arr.end()
2)dont use getline to take input.since input is like 1 2 3 4. they all r in same line and hence getline take them all at same time.use cin>>s instead.
Hope dis helps.

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.