结果为:10
2
100 421.529999 4.215300 A你和这个答案是真确的,如果你用的是VS,那么VS对float ,double有严格的限制,在编译的时候需要这么改:void main() { int a,b,c; float x; char ch; a=10; b=2; c=100; x=421.53; //x = (float)421.53,这样编译没有警告ch='A'; printf("%d %d %d\n",a,b,c); printf("%f\n",x); printf("%f\n",x/c); printf("%c\n",ch); ...
|