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 |
Re:我的改成那样了,为什么还错啊?请大牛帮帮忙啊!!!In Reply To:Re:我的改成那样了,为什么还错啊?请大牛帮帮忙啊!!! Posted by:13227183 at 2008-07-25 11:00:40 > /* Note:Your choice is C IDE */ > #include "stdio.h" > #include "string.h" > void main() > { > int m=0,dis,k=0; > char or[100],di[100],code,ch; > > scanf("%s%s",or,di); > while(strcmp(or,"0")!=0&&di[0]!='#') > { > scanf("%d%c%c",&dis,&ch,&code); > switch(code) > { > case 'F':m=m+dis*2;break; > case 'B':m=m+dis+(dis+1)/2;break; > case 'Y': > if(dis<500)m=m+500; > else > m=m+dis;break; > } > scanf("%s%s",or,di); > } > > printf("%d\n",m); > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator