C++ examples for Statement:goto
Program to show use of goto. This program ends only when the user presses Ctrl-Break.
#include <iostream> using namespace std; int main()/*from ww w . j a va 2s . c o m*/ { Again: cout << "This message \n"; cout << "\t keeps repeating \n"; cout << "\t\t over and over \n"; goto Again; // Repeat continuously. return 0; }