Why this is giving wrong answers


this is my code

Hey @dhruvilcodes
line 16th condition should be

  if(i%2==0)

if this resolves your query then please mark it as resolved :slight_smile:

still it is giving wrong answers

share ur code again…

Hey @dhruvilcodes
Mentioned the change in comment : https://ide.codingblocks.com/s/367454 :slight_smile: