fork download
  1. #include <stdio.h>
  2.  
  3. int func(int x, int y, int z){
  4. int xp = 1, yp = 1;
  5. int i;
  6. for(i = 0; i < z; i++){
  7. xp *= x;
  8. yp *= y;
  9. }
  10. return xp + yp;
  11. }
  12.  
  13. int main(void) {
  14. printf("%d\n", func(3, 4, 2));
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5308KB
stdin
Standard input is empty
stdout
25