16,466
社区成员
发帖
与我相关
我的任务
分享
bool bDirect=true;
for(int j=0;j<100;j++)
{
static int n=0;
cout<<n%6<<" ";
if (n==5)
{
bDirect=false;
}
else if (n==0)
{
bDirect=true;
}
if (bDirect)
{
n++;
}
else
{
n--;
}
}
int nA[10] = {0};
const int nB = 5;
const int nC = 4;
for(int i = 0; i < 5;i++)
{
nA[nC-i] = nB - i;
nA[nC+i] = nB - i;
}
nA[9] = 0;