Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:请大家看看为什么错了?老是出现编译错误。谢谢了!In Reply To:请大家看看为什么错了?老是出现编译错误。谢谢了! Posted by:y05dzz at 2006-01-27 17:09:54 > #include<iomanip.h> > int find(int &n){ > int i=0; > while(1){ > i++; > if(n==1)break; > else > { > if(n%2==1) > {n=3*n+1;} > else n=n/2; > } > } > return i; > } > int mian()------>应该是main()吧,呵呵 > { > int i,j,m=1,n; > cin>>i>>j; > cout<<i<<j; > while(n<j) > { > n=find(m); > m++; > if(n<i)continue; > } cout<<m-2<<endl; > return 0; > } > > Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator