Question: using c++ language, functions and loops. (No math) Problem 2 Fibonacci Numbers Fibonacci numbers are a sequence of numbers where each number is represented by

 using c++ language, functions and loops. (No math) Problem 2 Fibonacci

using c++ language, functions and loops. (No math)

Problem 2 Fibonacci Numbers Fibonacci numbers are a sequence of numbers where each number is represented by the sum of the two preceding numbers, starting with 0 and 1: 0, 1, 1, 2, 3, 5, 8, eto. Write a program that prompts the user for a positive integer and prints out whether or not that integer is a Fibonacci number. The program terminates when-1 is entered. Assignment 5 Create a function with the following signature. The function tests whether the number passed to it is a Fibonacci number or not. It returns true if the number is indeed a Fibonacci number and it returns false otherwise. bool isFibonacci(int number) Example: Input: 21 Output: 21 is a Fibonacci number Input: s9 Output: 9 is not a Fibonacei number Input: -1 Goodbye! Problem 3 Diamonds

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!