12345678910111213141516171819202122232425
#include <iostream> using namespace std; int first=0,second=1,maks,number=1; int main() { cout<<"Enter limit"; cin>>maks; cout<<first; cout<<second; while(number<maks) { number=(first+second); first=second; second=number; if (number<maks) { cout<<number; } } system("pause"); return(0); }