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 |
我也想问。都让我挤到for里了In Reply To:这题有什么比较方便的方法读数据么? Posted by:kansas at 2007-08-14 17:10:24 struct zh { ... }a[23]; int wei(char x) { ... } int year(char *x) { ... } for (;memset(a,0,sizeof(a)),scanf("%d",&a[1].num),a[1].num;printf("\n")) { for (i=1;i<=22;i++) { if (i!=1) scanf("%d",&a[i].num); scanf(" %s %c",&a[i].s,&c); a[i].w=wei(c); for (;scanf("%c",&c),c==' ';a[i].t+=year(cc)) scanf("%s",&cc); } ... } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator