Advertisement
QUIZERA

pyramid

Feb 17th, 2019
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     int i, j, k, l;
  5.  
  6.     for (i = 1; i <= 5; i++) {
  7.         for(j=5;j>i;j--)
  8.             printf(" ");
  9.  
  10.         for(k=i;k>=1;k--)
  11.             printf("%d",k);
  12.  
  13.         for(l=2;l<=i;l++)
  14.             printf("%d",l);
  15.  
  16.         printf("\n");
  17.     }
  18.  
  19.     return 0 ;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement