Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
palindrome.c
B_141125_Repetidos
Project 3 Part 1 v1.6
2 size mas
B_141209_TrianguloTartalia
blue point
My first program
Quiz4
B_14118_RestasSucesivas
Lab 9 v0.96
stackse - search stackoverflow differently
Please log in to post a comment.