Chewbacca and Number

The code is correct and it is working correctly in my eclipse, I don’t know why isn’t ur working here. Help.

Please share your code by saving it on the coding blocks IDE online.

[https://ide.codingblocks.com/s/157989]

I am sharing a sample code that will give you the idea for the question & you will be able to understand the code more clearly. It will not work, it’s just an example.

If you have any other doubts, please feel free to ask.

Ya but my code is running perfectly in eclipse. I dont get whats wrong

Can you find out what is missing in my code, because ive tried it numerous times and it is giving me the correct output

there are different test cases made specially to check your code against every possible situation.
Try your code with other different values as well. Maybe a end condition is missing in the code, check for that too.
Try to implement the illustrated example in your code also.

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.