wu1024 @ 2015-07-22 17:31:56
#include<stdio.h>
int main(){
int n,k;
scanf("%d",&k);
n=k/100+(k/10%10)*10+(k%10)*100;
printf("%d\n",n);
}
by kkksc03 @ 2015-07-22 22:48:27
@[url=/space/show?uid=7302]wu1024[/url] 拜托问问题前就不能看下讨论吗?已经有人犯了跟你一样的错误。
by wanglishuang @ 2015-07-24 16:21:27
如果最高位是0呢?
by 自动Wrong机 @ 2016-07-10 14:58:25
FPC编程的,望采纳
var a,i,j:longint;
b:boolean;
s,s2:string;
begin
readln(a);
b:=false;
s2:='';
if a=0 then begin writeln(0);halt;end;
if a<0 then begin b:=true;a:=abs(a);end;
str(a,s);for i:=length(s) downto 1 do
s2:=s2+s[i];val(s2,i);
if b then write('-');
write(i);end.
by 自动Wrong机 @ 2016-07-10 14:59:12
调成自动识别语言就照了~