+ 1

Where is the wrong?

#include <stdio.h> #include <math.h> main() { int a,b,c,d,f,g; printf ("请输入一个四位数\n"); scanf("%d",&a); a=fabs(a); b=a/1000; c=(a-b*1000)/100; d=(a-b*1000c-c*100)/10; f=(a%10); g=f*1000+d*100+c*10+b; printf("逆序数是%d",g); }

25th Feb 2017, 5:51 AM
Zhangyun
Zhangyun - avatar
6 odpowiedzi
+ 12
Where are you trying to run this code on? If you are trying to run it on Code Playground, Code Playground doesn't support C language.
25th Feb 2017, 6:17 AM
Hatsy Rei
Hatsy Rei - avatar
+ 4
True of Hatsy Rei! And d = (a-b*1000-c*100)/10;
25th Feb 2017, 8:35 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 2
Thanks
25th Feb 2017, 8:54 AM
Zhangyun
Zhangyun - avatar
+ 1
the chinese.
25th Feb 2017, 6:04 AM
Michael Szczepanski
Michael Szczepanski - avatar
0
where are you from?
25th Feb 2017, 8:57 AM
Zhangyun
Zhangyun - avatar