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 |
为什么又runtime erro ?#include"iostream" using namespace std; int main() { int a,i,j; long day[100],mon[100],year[100]; char h[20][10]={"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"}; char date[20][10]={"imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"}; char m[10],d; cin>>a; for(i=0;i<a;i++) { cin>>day[i]>>d>>m>>year[i]; for(j=0;j<=18;j++) if(strcmp(m,h[j])==0)mon[i]=j; day[i]=day[i]+1+mon[i]*20+year[i]*365; } cout<<a<<endl; for(i=0;i<a;i++) { cout<<day[i]%13<<" "; cout<<date[day[i]%20-1]<<" "; cout<<day[i]/260<<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