69,371
社区成员
发帖
与我相关
我的任务
分享
int _tmain(int argc, _TCHAR* argv[])
{
int a[10]={0},i=0,count1=0,count2=0;
while(count2<9)
{
if(a[i]==0)
{
count1++;
}
if(count1==5)
{
count1=0;
a[i]=-1;
++count2;
}
++i;
i%=10;
}
for (i=0;i<10;++i)
if(a[i]==0){
printf("%d\n",i);
}
return 0;
}