i am getting wrong answer
please check my code . and why it giving wrong answer.
note:- please don’t share the outside reference link.
read my code and comment the mistakes
Redundant parenthases
Please provide your code in Coding Blocks IDE.
i have shared please check sir
instead of getline , when i have used cin . then its worked fine
Good to see that you debugged the code yourself. When we use cin to read it only reads till there are continuous character. In your program it reads t, then stops when you use getline it starts from the position where cin left so it reads ‘\n’, then second string and so on, which leaves last string unread.
Please mark your query as resolved if your query is resolved.
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.