Advertisement
dllbridge

Untitled

Jun 6th, 2024
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.04 KB | None | 0 0
  1.  
  2. #include       <stdio.h>
  3.  
  4.  
  5.  
  6. void foo(int);
  7.  
  8. ////////////////////////////////////////////////////
  9. int main()                                        //
  10. {
  11.    
  12.  
  13.     foo(7);  
  14.     foo(8);
  15.          
  16.  return 0;     
  17. }
  18.  
  19.  
  20.  
  21.  
  22.  
  23. /////////////////////////////////////////////////////
  24. void foo(int n1)
  25. {
  26.        
  27.      for(int i = 2; i < 10; i++)
  28.      {
  29.      
  30.          printf("%d * %d = %d\n", n1, i, n1 * i);
  31.      }
  32.      printf(" - - - - - - - -\n");  
  33.  
  34. }
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.   //  printf("foo(3, 7) = %d\n", foo(7) );  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. /*
  61.  
  62. #include       <stdio.h>
  63.  
  64.  
  65. int n = 4;
  66.  
  67. int foo(int, int);
  68.  
  69. ////////////////////////////////////////////////////
  70. int main()                                        //
  71. {
  72.    
  73.     printf("n         = %d\n", n         );
  74.     printf("foo(3, 7) = %d\n", foo(1, 7) );    
  75.    
  76.  return 0;     
  77. }
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84. /////////////////////////////////////////////////////
  85. int foo(int n1, int n2)
  86. {
  87.        
  88.     int nRes = n1 + n2;  
  89.        
  90.  return nRes;      
  91. }
  92.  
  93.  
  94.  
  95.  
  96. */
  97.  
  98.  
  99.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement