fig02_27.cpp
来自「经典vc教程的例子程序」· C++ 代码 · 共 22 行
CPP
22 行
// Fig. 2.27: fig02_07.cpp
// Using the continue statement in a for structure
#include <iostream.h>
int main()
{
for ( int x = 1; x <= 10; x++ ) {
if ( x == 5 )
continue; // skip remaining code in loop
// only if x is 5
cout << x << " ";
}
cout << "\nUsed continue to skip printing the value 5"
<< endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?