Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- int n;
- printf("El valor de n: ");
- scanf("\n %d",&n);
- printf("El nuevo valor es: ");
- printf("\n %d", rec3(n));
- return 0;
- }
- int rec3 (int n){
- if (n<=1)
- return (1);
- else if (n>1)
- return (rec3 (n-1) + rec3 (n-1));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement