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 |
HELP!!!!!!!help!!!!!!!!!!HELP!!!!!!!!!!!what's the mistake????????? #include <stdio.h> main() { char num[9]; int i,k,u; gets(num); for(i=0;num[i]=='\0';i++) i=i--; u=i; if(num[i]!=5){ if(0<=num[1]<5) k=num[0]*10^u; if(5<=num[1]<=9) k=num[0]++*10^u;} else if (num[i]==5) { for(i=u;i==0;i--) if(num[i]==4) k=num[0]++*10^u; } printf("%d",k); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator