C++ program to print Fibonacci series using while statement
C++ program to print Fibonacci series using while statement #include<iostream> using namespace std; int main() { int f1,f2,f3,n,i; f1=0; f2=1; cout>>n; cout<<“n”<<f1<<“,”<<f2; i=3; while(i<=n) { f3=f1+f2; //1,2,3,5 cout<<“,”<<f3; f1=f2; //1,1,2,3 … Read More