code is running in infinite loop…please find the error
Remove duplicate
hey @3lokesharora, you returning from a void function. Also you should use pre increment of i instead of post increment. I have made these changes to your code you can check them here https://ide.codingblocks.com/s/108603