啊啊啊学c语言PUA要烧了
#include <iostream>
#include <math.h>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
long f1,f2,f3,f4,n;
cin>>n;
f1=1;f2=2;f3=3;
for(int i=1;i++;)
{
f4=(f1+f2+f3)/2;
f1=f2;f2=f3;f3=f4;
if(f1>n)
{
cout<<i;
break;
}
}
return 0;
}