// GOTO.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int i,j;
for(i=0;i<10;i++)
{
cout<<"Outer loop executing,i="<<i<<endl;
for ( j = 0; j < 3; j++ )
{
cout<<" Inner loop executing.j="<<j<<endl;
if(i==5)
goto stop;
}
}
cout<<"Loop exited. i ="<<i<<endl;
stop: cout<<"Jumped to stop.i ="<< i<<endl;//stop: 就是标签
return 0;
}