Quick actions

cmd+k|ctrl+k

Navigation

Languages

Recursive_Pow

Snippet info

Language

C

Visibility

public

Author

alleciooo

Created

2017-08-04T23:08:57Z

Updated

2017-08-04T23:21:29Z

#include <stdio.h>

int Pow(int x,int y){
   if(y == 0){
       return 1;
   }else if(y == 1){
       return x;
   }else{
       return x * Pow(x,(y-1));
   }
    
}

int main(void) {
    printf("%d\n",Pow(2,5));
    return 0;
}
INFO