Question: USING C++. USING C++ Fibonacci Basic Theory: fib 0 = 0 (when n = 0) fib 1 = 1 (when n = 1) fib n
USING C++. USING C++
Fibonacci
Basic Theory:
fib0 = 0 (when n = 0)
fib1 = 1 (when n = 1)
fibn = fibn-1 + fibn-2 (when n > 1)
Part 1: Using File Input, write a program that reads in a textfile called fibonacci.txt and computes the fibonacci sequence for each of the numbers (0-19) listed in the text. The fibonacci sequence should be displayed onto the screen.
Part 2: Using File Output, (similar to Part 1) write a program that reads in a textfile called fibonacci.txt and computes the fibonacci sequence for each of the numbers (0-19) listed in the text. The fibonacci sequence should be written to a file called output.txt.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
