fork download
  1. #include <stdio.h>
  2.  
  3.  
  4.  
  5.  
  6. int main() {
  7. int n;
  8. printf("Enter the n: \n");
  9. scanf("%d",&n);
  10.  
  11.  
  12.  
  13. for( int i=0;i<=n;i++){
  14.  
  15. /* for(int sp=1;sp<=n-i;sp++){
  16.   printf(" ");
  17.   }*/
  18.  
  19. int first =1;
  20.  
  21. for(int j=0;j<=i;j++){
  22. printf(" %d ",first);
  23. first= first*i-j/(j+1);
  24.  
  25. }
  26. printf("\n");
  27. }
  28.  
  29. return 0;
  30. }
Success #stdin #stdout 0.01s 5312KB
stdin
6
stdout
Enter the n: 
  1  
  1    1  
  1    2    4  
  1    3    9    27  
  1    4    16    64    256  
  1    5    25    125    625    3125  
  1    6    36    216    1296    7776    46656