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