| ||||||||||
| 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:xenon168 at 2009-05-16 19:57:52 和你一样,也贴出来
> #include<iostream>
> using namespace std;
>
> int main()
> {
> int i,j;
> float sum=0;
> float test[100];
> for(i=0;i<=100;i++){
> cin>>test[i];
> if((test[i]==0)||(test[i]<0)||(test[i]>5.2))
> break;
> }
> for(i=0;i<=100;i++){
> if(test[i]==0)
> break;
> for(j=2;j<100;j++)
> sum=sum+(1/j);
> if(sum>test[i]){
> cout<<j-1<<"card(s)"<<endl;
> }
> break;
>
> }
> return 0;
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator