+ 1
Help on c++
guys I made a program now I would like to simplify with the functions someone would know how to help me? #include <iostream> using namespace std; int main() { int k1=0,k2=1,k3,numeri; cout<<"inserisci quanti numeri di fibonacci vuoi "; cin>>numeri; cout<<k1<<" "<<k2<<" "; for(int i=2;i<numeri;++i) { k3=k1+k2; cout<<k3<<" "; k1=k2; k2=k3; } return 0; }
3 Antworten
0
Yes
0
Thanks