fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n;
  5. printf("Enter the number of rows: \n");
  6. scanf("%d",&n);
  7. int min=0;
  8. for(int i=1;i<=n;i++){
  9. for(int j=1;j<=n;j++){
  10.  
  11. if(i<j) min = i;
  12. else min =j;
  13. printf("%d",min);
  14.  
  15. }
  16.  
  17. printf("\n");
  18.  
  19. }
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0.01s 5320KB
stdin
5
stdout
Enter the number of rows: 
11111
12222
12333
12344
12345