首页 > 其他 > 详细

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

时间:2021-09-05 19:47:49      阅读:40      评论:0      收藏:0      [点我收藏+]
#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;
}

 

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!