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 |
到底哪里错啦?????#include<iostream.h> void main(){ int p,e,i,d,k=1; while(k){ int n=1; cin>>p>>e>>i>>d; if(p==-1&&e==-1&&i==-1&&d==-1)break; for(;n;p+=23){ for(;e<=p;e+=28){ if(e==p){ for(;i<=e;i+=33){ if(i==e){ if(i>d){ cout<<"Case "<<k++<<": the next triple peak occurs in " <<i-d<<" days."<<endl; n=0; } else{ cout<<"Case "<<k++<<": the next triple peak occurs in " <<i-d+21252<<" days."<<endl; n=0; } } } } } } } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator