fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int i,j,num=11,space,rows;
  7. printf("enter the no. of rows\n");
  8. scanf("%d",&rows);
  9. for(i=1;i<=rows;i++)
  10. {
  11. for(space=1;space<=(rows-i);space++)
  12. {
  13. printf(" ");
  14. }
  15. {
  16. for(j=1;j<i+1;j++)
  17. {
  18. printf("%d ",num);
  19. num++;
  20. }
  21. printf("\n");
  22. }
  23. }
  24. }
Success #stdin #stdout 0s 4388KB
stdin
4
stdout
enter the no. of rows
         11    
      12    13    
   14    15    16    
17    18    19    20