18 lines
184 B
C++
18 lines
184 B
C++
#include<iostream>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int n=1,m=1,k,t;
|
|
cin>>k;
|
|
do
|
|
{
|
|
t=n+m;
|
|
if(t<=k)
|
|
{
|
|
m=n;
|
|
n=t;
|
|
}
|
|
}
|
|
while(t<=k);
|
|
cout<<"m="<<m<<endl<<"n="<<n;
|
|
} |