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

我的1006程序错在哪里了?

Posted by neu08110650302 at 2010-07-03 22:15:35 on Problem 1006
#include <iostream>
using std::cin;
using std::cout;
using std::endl;

int main()
{
	int p,e,i,d,m=0;
	while(cin>>p>>e>>i>>d&&p!=-1&&e!=-1&&i!=-1&&d!=-1)
	{
		m++;
		p+=23;
		while((p-e)%28!=0||(p-i)%33!=0)
		{
			p+=23;
		}
		cout<<"Case "<<m<<": the next triple peak occurs in "<<p-d<<" days."<<endl;
	}
	return 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