Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:到底哪里错啦?????

Posted by cpp00548289 at 2006-02-26 14:48:22 on Problem 1006
In Reply To:到底哪里错啦????? Posted by:cpp0600548117 at 2006-02-22 22:47:46
> #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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator