Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
fibonacci1
#include <stdio.h> // fibonacci sequence - מציאת איבר של סידרת פיבונאצי בשיטת הריקורסיה int fibo(int n1, int n2, int n); int main() { int n; printf("Enter positive integers: \n"); scanf("%d ", &n); printf("The %d's item of fibonacci sequence is %d.", n, fibo(1, 1, n)); return 0; } int fibo(int n1, int n2, int n) { if (n > 0) return fibo(n2, n1+n2, --n); else return n1; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
swap_bitwise.c
pointer_swap
Absolute valu
709 lab 3.1
Assignment 5 part 2
Sumit
example of scanf and basic integer manipulation
gcc compiler code for delay
else if
ajr
Please log in to post a comment.