My code is working fine(giving desired outputs) when I run it in GeeksforGeeks IDE,but when I run it in Coding Blocks IDE,it’s showing an error.
I found that it’s not taking the array values properly in CB IDE.
I’m enclosing the code written in both the IDE’s
GeeksforGeeks IDE :
https://ide.geeksforgeeks.org/2ZkQ2gd2C5
Coding Blocks IDE :