In a situation like the loop below, what are the ways other than goto
to get out of the nested loop at once?
#include<stdio.h>
int main(void)
{
int i,j,k ;
for(i=1;i<=3;i++)
{
for(j=1;j<=3;j++)
{
for(k=1;k<=3;k++)
{
if(i==3&&j==3&&k==3)
goto out ;
else
printf("%d%d%d\n",i,j,k) ;
}
}
}
out :
printf("Out of the loop at last!") ;
}