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