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