Advertisement
apl-mhd

TringleShape

Sep 4th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. /*
  5. 1
  6. 2 2
  7. 3 3 3
  8. 4 4 4 4
  9. 5 5 5 5 5
  10.  
  11. */
  12.  
  13. int main()
  14. {
  15.  
  16. int row, i,j, number = 0;
  17. scanf("%d",&row);
  18.  
  19. for(i = 1; i<=row; 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