I am a beginner in C++ and need help creating a C++ Code. The problem states:
Write a C++ Program that outputs the Fibonacci numbers that are less than a user specified value. Each Fibonacci number is the sum of its two predecessors. The first two Fibonacci numbers are are 1 and 1. Thus, the sequence begins with;
1, 1, 2, 3, 5, 8, 13, 21, 34, … and so on.
The program should keep asking the user for an upper limit and display the Fibonacci numbers that re less than that upper limit until the user enters an upper limit of 1 or less to quit
Output each Fibonacci number on a separate line.
Sample
What I have so far is
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream>
#include <iomanip>
#include <cmath>
usingnamespace std;
int main()
{
int fib;
int fib1 = 0;
int fib2 = 1;