fork(1) download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. void integerPower(int y, int ret[4]) {
  5. ret[0] = pow(y, 2);
  6. ret[1] = pow(y, 3);
  7. ret[2] = pow(y, 4);
  8. ret[3] = ret[0] + ret[1] + ret[2];
  9. }
  10. int main(void) {
  11. int valores[4];
  12. integerPower(5, valores);
  13. printf("%d\n", valores[0]);
  14. printf("%d\n", valores[1]);
  15. printf("%d\n", valores[2]);
  16. printf("%d\n", valores[3]);
  17. }
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
25
125
625
775