Guest User

Untitled

a guest
Jun 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. static const short int TRIANGLE = 5;
  4.  
  5. void draw_line(int stars)
  6. {
  7.         short int i;
  8.         for(i = 1 ; i <= stars ; ++i) printf("*");
  9.         printf("\n");
  10.         if(stars == TRIANGLE)
  11.                 return;
  12.         else
  13.                 draw_line(++stars);
  14. }
  15.  
  16. int main()
  17. {
  18.         draw_line(1);
  19.         printf("\n");
  20.         return 0;
  21. }
Add Comment
Please, Sign In to add comment