Code of Patteran 2,4,3,6,5,10 ...
// Made by Muhammad abdullah // You can Visit lot of c++ program from this link pakacademy79.com videos // if you need any source code video then contact me on my website cotact us page. #include<iostream> #include<conio.h> using namespace std; //Display this 2,4,3,6,5,10 ... int main() { int j=2,m=3; int k=4,f=6; int n; cout<<"Enter n value sto display this patteran:"; cin>>n; cout<<"\n"<<j<<","<<k<<","<<m<<","<<f<<","; for(;(k+f) <=n;) { cout<<j+m<<","; cout<<k+f<<","; int h; h=j; j=m; m=m+h; h=k; k=f; f=f+h; } getch(); }