040.程序流程结构-跳转语句-goto语句

#include <iostream>
using namespace std;
int main()
{
    //goto语句

    cout << "1.xxxxxxxxxx" << endl;
    cout << "2.xxxxxxxxxx" << endl;
    goto AA;//跳转到标记
    cout << "3.xxxxxxxxxx" << endl;
    cout << "4.xxxxxxxxxx" << endl;
AA://标记,后面使用冒号
    cout << "5.xxxxxxxxxx" << endl;

    system("pause");
    return 0;
}

 

posted @ 2021-09-04 09:44  梦之心  阅读(40)  评论(0编辑  收藏  举报