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> #include<string> using namespace std; void main() { int number; string haabmouth[19]; haabmouth[0]="pop"; haabmouth[1]="no"; haabmouth[2]="zip"; haabmouth[3]="zotz"; haabmouth[4]="tzec"; haabmouth[5]="xul"; haabmouth[6]="yoxkin"; haabmouth[7]="mol"; haabmouth[8]="chen"; haabmouth[9]="yax"; haabmouth[10]="zac"; haabmouth[11]="ceh"; haabmouth[12]="mac"; haabmouth[13]="kankin"; haabmouth[14]="muan"; haabmouth[15]="pax"; haabmouth[16]="koyab"; haabmouth[17]="cumhu"; haabmouth[18]="uayet"; string hollydata[20]; hollydata[0]="imix"; hollydata[1]="ik"; hollydata[2]="akbal"; hollydata[3]="kan"; hollydata[4]="chicchan"; hollydata[5]="cimi"; hollydata[6]="manik"; hollydata[7]="lamat"; hollydata[8]="muluk"; hollydata[9]="ok"; hollydata[10]="chuen"; hollydata[11]="eb"; hollydata[12]="ben"; hollydata[13]="ix"; hollydata[14]="mem"; hollydata[15]="cib"; hollydata[16]="caban"; hollydata[17]="eznab"; hollydata[18]="canac"; hollydata[19]="ahau"; cin>>number; int data[200],year[200]; string mouth[200]; int n=number,i=0; char a; while(n) { cin>>data[i]>>a>>mouth[i]>>year[i]; if(year[i]>=5000||data[i]<0||year[i]<0) continue; int k; for(k=0;;k++) { if(mouth[i]==haabmouth[k]) break; } int days=data[i]+k*20+year[i]*365; year[i]=days/260; data[i]=(days%260)%13+1; mouth[i]=hollydata[(days%260)%20]; i++; n--; } i=0; cout<<number<<endl; while(number) { cout<<data[i]<<' '<<mouth[i]<<' '<<year[i]<<endl; i++; number--; } return; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator