This C program uses recursion to calculate and print the Fibonacci sequence up to a number entered by the user. It defines a fibo function that recursively calls itself to calculate individual Fibonacci numbers, and a main function that calls fibo and prints the results of each call in a loop up to the user-input number.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
29 views
Int Int Int Int /N %D For Int %D/T
This C program uses recursion to calculate and print the Fibonacci sequence up to a number entered by the user. It defines a fibo function that recursively calls itself to calculate individual Fibonacci numbers, and a main function that calls fibo and prints the results of each call in a loop up to the user-input number.
Tshri Vile Parle Kelvani Mandal'S D. J. Sanghvi College of Engineering Department of Information Technology Semester: Iii Subject: Java Programming Lab
Tshri Vile Parle Kelvani Mandal'S D. J. Sanghvi College of Engineering Department of Information Technology Semester: Iii Subject: Java Programming Lab