huangzirui @ 2017-03-12 15:19:09
#include<stdio.h>
#include<string.h>
int main()
{char a[10000009],b[10000009];
int k=0,i;
gets(a);
if(a[0]!='-'){
for(i=0;i<=strlen(a);i++){
b[strlen(a)-i]=a[i];
}for(i=0;i<=strlen(a);i++)
if(b[i]!='0')k=1;
if(k==1)printf("%d",b[i]);
}else{
for(i=1;i<=strlen(a);i++){
b[strlen(a)-i]=a[i];
}for(i=1;i<=strlen(a);i++)
if(b[i]!='0')k=1;
if(k==1)printf("%d",b[i]);
}
}return 0;
}
WHY? _求指点啊~~~_
by _xcc_ @ 2017-03-12 16:16:46
@huangzirui return0前面多打了一个大括号 { ,去掉就好了.