sahajjain01

17.Display Pattern #01

Aug 16th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. /* Program to display the following pattern:
  2. *
  3. **
  4. ***
  5. ****
  6. *****
  7. */
  8. #include<stdio.h>
  9. #include<conio.h>
  10.  
  11. void main()
  12. {
  13.     int i, j;
  14.  
  15.     clrscr();
  16.  
  17.     for(i = 0; i<4; i++) {
  18.         for(j = 0; j <= i; j++)
  19.             printf("*");
  20.         printf("\n");
  21.     }
  22.  
  23.     getch();
  24. }
Advertisement
Add Comment
Please, Sign In to add comment