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 Error啊??!!#include<iostream.h> #include<string.h> #include<stdio.h> #define MAX 50 typedef struct { int data; char mth[10]; int yr; }hollytype; char Haab[19][10]={"pop","no","zip","zotz","tzec","xul", "yoxkin","mol","chen","yax","zac","ceh","mac","kankin", "muan","pax","koyab","cumhu","uayet"}; char Tzolkin[20][10]={"imix","ik","akbal","kan","chicchan", "cimi","manik","lamat", "muluk","ok","chuen","eb", "ben","ix","mem","cib","caban","eznab","canac","ahau"}; void main() { int n,i,d,y,count; char st[10]; hollytype holly[MAX]; cin>>n; for(i=0;i<n;i++) { int j=0; scanf("%d. %s %d",&d,&st,&y);//NumberOfTheDay. Month Year while(strcmp(st,Haab[j])) j++; count=d+j*20+y*365; holly[i].data=count%13+1; strcpy(holly[i].mth,Tzolkin[count%20]); holly[i].yr=count/260; } cout<<n<<endl; for(i=0;i<n;i++) cout<<holly[i].data<<" "<<holly[i].mth<<" "<<holly[i].yr<<endl; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator