Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- static const short int TRIANGLE = 5;
- void draw_line(int stars)
- {
- short int i;
- for(i = 1 ; i <= stars ; ++i) printf("*");
- printf("\n");
- if(stars == TRIANGLE)
- return;
- else
- draw_line(++stars);
- }
- int main()
- {
- draw_line(1);
- printf("\n");
- return 0;
- }
Add Comment
Please, Sign In to add comment