一道简单C语言题(各位答题者请答完整,答不完整我又不采纳岂不浪费时间)

该程序输入一个三位数,然后进行个位和百位的置换,如234,转换成432。
#include <stdio.h>
int main( )
{
scanf("%d",n);
a=n%10;
b=(n/10)%10;
c=(n/100)%10;
m=100*a+10*b+c;
printf("%d=>%d\n ",n,m);
return 0;
}
该程序中有哪些地方存在错误或不妥的地方?

234
234=>432
Press any key to continue

#include <stdio.h>
int main( )
{
int a,b,c,m,n; //变量声明
scanf("%d",&n); //n前面记得加取地址符&
a=n%10;
b=(n/10)%10;
c=(n/100)%10;
m=100*a+10*b+c;
printf("%d=>%d\n ",n,m);
return 0;
}
温馨提示:答案为网友推荐,仅供参考
相似回答