What's wrong with this code ..its working in fine in my editor
its showing wrong answer when i try to submit it
@Narasimha,
https://ide.codingblocks.com/s/224796 corrected code.
I have added a comment on the error line. Use next instead of nextLine for input. nextLine skips one input.
For the sample test case your output was:
x3.14x
xab3.14xx3.15x
It should’ve been:
x3.14x
xab3.14xx3.15x
x3.143.14p3.14xx
got the mistake…
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.