How to use goto in c : Goto « Language Basics « C / ANSI-C






How to use goto in c

  
#include <stdio.h>

int main(void) {

  int i;

  i = 1;

  again:
  printf("%d ", i);
  i++;
  if(i<10) 
      goto again;

  return 0;
}

           
       








Related examples in the same category