Code producing wrong output!

please see my code_https://ide.codingblocks.com/s/282332

@Nikhil-Jettley-2567269533523013
image
you are just checking if prime[1] is prime or not, it should be prime[i] here.
it is giving correct answer now : https://ide.codingblocks.com/s/287772