問題詳情

九、請依下列程式求出 x 與 y 的值。(9 分)
int x=0, y=0;
for(int i=0;i<100;i++)
for(int j=i+1;j<100;j++)
{ x++;
for(int z=j+1; z<=100;z++) y++;
}

參考答案