Program to Illustrate GOTO Statement

#include<stdio.h>
#include<conio.h>
void main()
{
int num;
clrscr();
bca:
printf("\nEnter No.");
scanf("%d",&num);
if(num<0)
goto bca;
printf("\nThis is Right Number");
getch();
}

Leave a Reply