Advertisement
Ramasaco

Pema

Dec 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     int i, space, rows=5, k=0,ylli=5,cnt,cnt1,ylli2=19;
  5.  
  6.  
  7.  
  8.     for(i=1; i<=rows; ++i, k=0)
  9.     {
  10.         for(space=1; space<=rows-i; ++space)
  11.         {
  12.             printf("  ");
  13.         }
  14.  
  15.         while(k != 2*i-1)
  16.         {
  17.             printf("* ");
  18.             ++k;
  19.         }
  20.  
  21.         printf("\n");
  22.     }
  23.     for (cnt=1;cnt<ylli;cnt++)
  24.     {
  25.         printf("        *");
  26.         printf("\n");
  27.  
  28.     }
  29. for (cnt1=1;cnt1<ylli2;cnt1++)
  30. {
  31.     printf("*");
  32. }
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement