我在C++程序里用了两个cout,中间隔了一段代码为什么前一个显示,但后一个就不显示了?
cout<<"1号点:单顺数量"<<iDanshun+1<<endl;
//在已有的单顺中合并出双顺
for(i=0;i<=iDanshun-1;i++)
{
for(j=i+1;j<=iDanshun;j++)
{
if(danshun[i][0]==danshun[j][0]&&danshun[i][1]==danshun[j][1])
{
for(k=i;danshun[k]>=0;k++)
{
danshun[k][0]=danshun[k+2][0];
danshun[k+1][0]=danshun[k+3][0];
danshun[k][1]=danshun[k+2][1];
danshun[k+1][1]=danshun[k+3][1];
}
iShuangshun+=1;
shuangshun[iShuangshun][0]=danshun[i][0];
shuangshun[iShuangshun][1]=danshun[i][1];
}
}
}
iDanshun=iDanshun-iShuangshun*2;
cout<<"统计: 单顺数量: "<<iDanshun+1<<endl;
cout<<"1号点:单顺数量"<<iDanshun+1<<endl;
//在已有的单顺中合并出双顺
for(i=0;i<=iDanshun-1;i++)
{
for(j=i+1;j<=iDanshun;j++)
{
if(danshun[i][0]==danshun[j][0]&&danshun[i][1]==danshun[j][1])
{
for(k=i;danshun[k]>=0;k++)
{
danshun[k][0]=danshun[k+2][0];
danshun[k+1][0]=danshun[k+3][0];
danshun[k][1]=danshun[k+2][1];
danshun[k+1][1]=danshun[k+3][1];
}
iShuangshun+=1;
shuangshun[iShuangshun][0]=danshun[i][0];
shuangshun[iShuangshun][1]=danshun[i][1];
}
}
}
iDanshun=iDanshun-iShuangshun*2;
cout<<"统计: 单顺数量: "<<iDanshun+1<<endl;