fork download
  1. #include <stdio.h>
  2.  
  3. void retorna(int x);
  4.  
  5. int main(void) {
  6.  
  7. int n;
  8.  
  9. scanf("%d", &n);
  10. retorna(n);
  11. return 0;
  12. }
  13. void retorna(int x)
  14. {
  15. int i;
  16. for (i=1; i<=x; i++)
  17. {
  18. int j;
  19. for(j=0;j<i; j++)
  20. {
  21. printf("%d %d %d \n", j, j*j, j*j*j);
  22. printf("%d %d %d \n", j, j*j+1, j*j*j+1);
  23. }
  24. }
  25. }
  26.  
  27.  
Success #stdin #stdout 0s 10304KB
stdin
5
stdout
0 0 0 
0 1 1 
0 0 0 
0 1 1 
1 1 1 
1 2 2 
0 0 0 
0 1 1 
1 1 1 
1 2 2 
2 4 8 
2 5 9 
0 0 0 
0 1 1 
1 1 1 
1 2 2 
2 4 8 
2 5 9 
3 9 27 
3 10 28 
0 0 0 
0 1 1 
1 1 1 
1 2 2 
2 4 8 
2 5 9 
3 9 27 
3 10 28 
4 16 64 
4 17 65