Home > Back-end >  Topic as shown in figure, consult: output the answer is wrong, why I can execute code it is conclude
Topic as shown in figure, consult: output the answer is wrong, why I can execute code it is conclude

Time:01-05

# include
Int main ()
{
Int flag [50]={0};
Int m, n, I;
The scanf (" % d % d ", & m, & n);
Int num, index=0, k=0;
i=0;
While (num> n)
{
If (flag [I]==0)
{
Index++;
If (index % 2==1)
{
Flag [I]=1;
k++; }
If (index==m)
{index=0; I=1; }
}
Num=m - k;
i++;
}
for(i=0; I "m; I++)
{
If (flag [I]==0)
Printf (" % d ", I + 1);
}
printf("\n");
}
  • Related