fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main(void) {
  5. int n;
  6. int i;
  7. int j;
  8.  
  9. printf("n = ");
  10. scanf("%d", &n);
  11. for (i = 2; i <= n; i++) {
  12. for (j = 1; j <= i; j++) {
  13. printf("%.0f ", pow(i, j));
  14. }
  15. printf("\n");
  16. }
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 1680KB
stdin
5
stdout
n = 2 4 
3 9 27 
4 16 64 256 
5 25 125 625 3125