getting problem while displaying for loop

for (i = 0;i