The Fibonacci Sequence is the series of numbers:

0, 1, 1, 2, 3, 5, 8, 13, 21, ...

Each additional number in the sequence is found by adding the two previous numbers before it.

Write a program, fibonacci.c, that calculates the first 20 Fibonacci numbers. Your program should include a function, fib(), that receives an input parameter from main() telling the function how many Fibonacci numbers to output.

Remember that the main() function should appear as the first function in the program. Be sure to use function prototypes for each of the functions that are used in your program.

Output from your program should be sent to the terminal window (your screen) as well as the requested csis.txt output file. Be sure to read the document on Capturing Program output. Be sure to read the document on capturing program output. Your full name must appear as a comment in the source file that contians main(). Be sure to include the csis.txt output file in your zip archive.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.