Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Print the following three lines on the console:
  2.  
  3. *
  4. ***
  5. *****
  6.  
  7. void print_line(int N) {
  8. for (int i = 0; i < N; i++) {
  9. putchar('*');
  10. }
  11. putchar('n');
  12. }
  13.  
  14. int main(int argc, char * argv[]) {
  15. for (int i = 1; i <=3; i++) {
  16. print_line(2 * i - 1);
  17. }
  18. return 0;
  19. }
  20.  
  21. printf("*n");
  22. printf("***n");
  23. printf("*****n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement