hello @anantgovil123
here it should be a[i]
https://ide.codingblocks.com/s/342296 i did that still wrong answer is coming
initialise cn with 1.