#17_Goto Statements in c

 # include <stdio.h>


int main()
{
    int num;
    
    for (int i = 0; i < 8; i++)
    {
        printf("%d\n", i);
        for (int j = 0; j < 8; j++)
        {
            printf("%d Enter the number . Enter 0 to exit", j);
            scanf("%d", &num);
            if (num==0)
            {
                goto end;
            }
            
        }
        
    }
    end: 
    return 0;
}

Comments

Popular posts from this blog

#19_(2)Functions in C

Ch7_32_MethodOverloading

#72_Function Pointers in C