Advertisement
apl-mhd

Shape

Sep 4th, 2016
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. /*
  5.     5 5 5 5 5
  6.     4 4 4 4
  7.     3 3 3
  8.     2 2
  9.     1
  10.  
  11. */
  12.  
  13. int main()
  14. {
  15.  
  16.     int row, i,j, number = 0;
  17.     scanf("%d",&row);
  18.  
  19.     for(i = row; i >= 1; i--){
  20.  
  21.         for( j = 1; j <= i; j++  ){
  22.  
  23.             printf("%d ", i);
  24.  
  25.         }
  26.  
  27.         printf("\n");
  28.  
  29.     }
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement