Advertisement
mario_mos

gotom2

Jul 24th, 2023
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <limits.h>
  3.  
  4. int main()
  5. {
  6. int i,j,k;
  7.  
  8. for ( j = 0; j < 3; j++ ){
  9. printf("j = %d\n",j);
  10.  
  11. for ( i = 0; i < 3; i++ ){
  12. printf("j = %d\n",j);
  13.  
  14. for ( k = 0; k < 3; k++ ){
  15. printf("j = %d\n",j);
  16.  
  17.  
  18. if( i == 0 && j == 0 && k == 0){
  19. goto zero;
  20. }
  21. }
  22. }
  23. }
  24.  
  25. zero: printf( "Goto zero. i,j,k = %d\n", i,j,k );
  26.  
  27.  
  28.  
  29. return 0;
  30. }
  31.  
  32. /* resultat
  33. j = 0
  34. j = 0
  35. j = 0
  36. Goto zero. i,j,k = 0
  37. 10:09:53: /home/mariomoser/C_learning_journey/build-exemple_1-Desktop-Debug/exemple_1 exited with code 0
  38. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement