Mon Oct 30 2023 08:28:18 GMT+0000 (Coordinated Universal Time)
Saved by @yolobotoffender
#include<iostream> #include<iomanip> using namespace std; int main(){ int a=0,b=1,c,num; cout<<"enter the nujmber of terms: "<<endl; cin>>num; cout<<a<<' '<<b; for(int i=1;i<=num-2;i++){ c=a+b; a=b; b=c; cout<<' '<<c; } cout<<endl; return 0; }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments