Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

HELP!!!!!!!help!!!!!!!!!!HELP!!!!!!!!!!!

Posted by 21221 at 2008-12-24 06:19:07 on Problem 3077 and last updated at 2008-12-24 06:25:33
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator