Advertisement
dllbridge

Untitled

Sep 20th, 2024
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.68 KB | None | 0 0
  1.  
  2.  
  3. #include <stdio.h>
  4.  
  5.  
  6.  
  7. ///////////////////////////////////////
  8. void foo_Left(int n)
  9. {
  10.      
  11.  
  12.      for(int i = 0; i < 10-n; i++)
  13.      {
  14.         printf(" ");      
  15.      }
  16.  
  17.      for(int i = 0; i < n; i++)
  18.      {
  19.              
  20.         printf("*");        
  21.      }
  22.      //printf("\n");
  23. }
  24.  
  25.  
  26. ///////////////////////////////////////
  27. void foo(int n)
  28. {
  29.      
  30.    //  printf("            ");
  31.      for(int i = 0; i < n; i++)
  32.      {
  33.              
  34.         printf("*");        
  35.      }
  36.      printf("\n");
  37. }
  38.  
  39.  
  40.  
  41. ///////////////////////////////////////
  42. int main()
  43. {
  44.    
  45.  
  46.     for(int i = 1; i < 10; i++)
  47.     {
  48.        foo_Left(i);    
  49.        foo( i);
  50.     }
  51. }
  52.  
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement