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<stdio.h> #include<string.h> main(){ int i=0,n,month2,day,year1,day1; long int year,sum; char month[10],month1[10]; char Ma[][10]={"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"}; char Tz[][10]={"ahau","imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac"}; scanf("%d",&n); while(n){ scanf("%d.%s%d",&day,&month,&year); for(i=0;i<=18;i++){ if (strcmp(Ma[i],month)==0) break; } sum=365*year+i*20+day+1; year1=sum/260; day1=sum%13; month2=sum%20; printf("%d %s %d\n",day1,Tz[month2],year1); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator