Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
recursive fundamentos
//gcc 5.4.0 #include <stdio.h> int factorial(int n, int acc){ if ( n == 1){ return acc; } else{ return factorial(n-1,acc*n); } } int potencia( int n, int num,int acc){ if( n ==1){ return acc; } else{ return potencia(n-1,num,acc*num); } } int main(void){ int res = factorial ( 4,1); printf("%d\n", res); printf("%d",potencia(3,2,1)); }
run
|
edit
|
history
|
help
0
Busqueda binaria version recursiva
ques.1
la profe
ques4
Ppp
Multiple If statements v.09
C_141203_PALINDROMO
bit wise operation
bitwise operations
Hello, World