| ||||||||||
| 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>
using namespace std;
#define MAX 10
struct BIORHYTHMS
{
int PHY;
int EMO;
int INTE;
int DATE;
int result;
}BIO[MAX];
int main()
{
int count=0;
int i=-1;
do
{
i++;
cin>>BIO[i].PHY>>BIO[i].EMO>>BIO[i].INTE>>BIO[i].DATE;
BIO[i].result=(5544*BIO[i].PHY+14421*BIO[i].EMO+1288*BIO[i].INTE-BIO[i].DATE+21252)%21252;
if(BIO[i].result==0)
{
BIO[i].result=21252;
}
}while((BIO[i].PHY!=-1 && BIO[i].EMO!=-1 && BIO[i].INTE!=-1 && BIO[i].DATE!=-1));
for(int j=0;j<i;j++)
{
cout <<"Case"<< j+1 <<" : the next triple peak occurs in " <<BIO[j].result<<" days."<<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