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

时间:2021-09-05 19:47:49   收藏:0   阅读:32
#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;
}

 

原文:https://www.cnblogs.com/ceovs/p/15225857.html

评论(0)
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!