Good Programming Practice in Dev C++
Monday, 6 August 2012
Lecture: 134
Lecture 134
//
Loop
GoTo
#include <iostream>
#include <conio.h>
using namespace std;
main ()
{
int i;
Goto1: //Label
if(i==10) goto Goto2;
cout<<i;
i++;
goto Goto1;
Goto2:
getch();
return 0;
}
Output:
Newer Post
Older Post
Home