What is the problem?

, ,

int main()
{
int i;
for(i=0;i<10;i++)
{
printf(“ok\n”);
if(i=4)
{break;}
else
printf("%d\n",i);

}

return 0;
}
//only print ok not digit 1-3

Replace i = 4 by i == 4

1 Like