do {
if(n == 2)
break;
cout << n;
n--;
}
while(n > 0);
do {
cout << n;
if(n == 2)
break;
n--;
}
while(n > 0);
while(n <= 5) {
cout << n;
if(n == 1)
break;
n++;
}
以上程序的输出结果为:
while(n <= 5) {
if(n == 1)
break;
cout << n;
n++;
}
以上程序的输出结果为:
while(n <= 5) {
if(n == 1)
continue;
cout << n;
n++;
}
以上程序的输出结果为:
while(n <= 5) {
cout << n;
n++;
if(n == 1)
continue;
}
以上程序的输出结果为:
7题 | 被引用0次