Please have a look at my code. If it is confusing, you can give a corrected code I will understand it.
Here is the link - https://ide.codingblocks.com/s/215495
Please have a look at my code. If it is confusing, you can give a corrected code I will understand it.
Here is the link - https://ide.codingblocks.com/s/215495
Solution provided is in Java
Hello @rkyadavr9,
There are two mistakes in your code.
I have corrected your code:
Refer to the comments for better understanding.
Hope, this would help.
Give a like if you are satisfied.
Thank you very much!