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