Remove int variable from loop. We can't declare variable in for loop in c.