fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. /*int n;
  5.   printf("Enter the columns: \n");
  6.   scanf("%d",&n);*/
  7. int m;
  8. printf("Enter the rows: \n");
  9. scanf("%d",&m);
  10.  
  11. for(int i=1;i<=m;i++){
  12.  
  13. for(int j=1;j<=(2*m)-1;j=j+2){
  14. if(j<i)
  15.  
  16. printf("%d",j);
  17. }
  18.  
  19. printf("\n");
  20.  
  21. }
  22.  
  23.  
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 5332KB
stdin
10
stdout
Enter the rows: 

1
1
13
13
135
135
1357
1357
13579