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