for (int i = 1; i >-1; i--)
{
int a = i, b=0, c = 0, d = 0, e = 0;
int A = 0, B = 0, C = 0, D = 0, E = 0;
A++;
if (a == 1)
{
b = 1;
c = 0;
B++;
C++;
}
else if(b==0)
{
c = 1;
B++;
C++;
}
d = c;
D++;
if (d == 0)
{
e = 1;
}
if (e == 1)
{
a = e;
d = e;
A++;
D++;
E++;
}
else
{
d = 1;
E++;
}
if (A == 1 && B == 1 && C == 1 && D == 1 && E == 1)
{
if (a == 1)
printf("A有作案\n");
if (b == 1)
printf("B有作案\n");
if (c == 1)
printf("C有作案\n");
if (d == 1)
printf("D有作案\n");
if (e == 1)
printf("E有作案\n");
break;
}
continue;
}
白馬探 于 2008-11-7 14:26 对帖子补充以下内容
運行結果無誤
循環2次
但設計思路不知是否恰當
還請各位檢驗 |