While this program works correctly, using a goto statement is generally not considered good programming practice because it can make the code difficult to read and maintain. A better alternative would be to use a for or while loop to print the word "Goto" a given number of times.
#include<iostream> using namespace std; int main() { int i=1,n; cout<<"\nEnter The Limit:"; cin>>n; start: cout<<"\nGoto"; i++; if(i<=n) { goto start; } return 0; }To download raw file Click Here
Enter The Limit:5 Goto Goto Goto Goto Goto
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions