030.程序流程结构-循环结构-while语句


#include 
using namespace std;
int main()
{
    //while语句
    //屏幕打印0-9,这10个数字
    //避免死循环
    int i = 0;
    while (i<10)
    {
        cout << i<< endl;
        i++;

    }

    system("pause");
    return 0;
}
C++