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