|
1鱼币
- #include <stdio.h>
- void main()
- {
- char c='k';
- int i=1,j=2,k3;
- float x=3e+5,y=0.85;
- printf ("%d,%d\n",!x*!y,!!!x);
- printf ("%d,%d\n",x||i&&j-3,i<j&&x<y);
- printf ("%d,%d\n",i==5&&c&&(j=8),x+y||i+j+k);
- }
复制代码 代码如上 编译不过去 提示错误如下:
--------------------Configuration: 1111 - Win32 Debug--------------------
Compiling...
1.c
E:\C++6.0\Microsoft Visual Studio\MyProjects\1111\1.c(6) : warning C4305: 'initializing' : truncation from 'const double ' to 'float '
E:\C++6.0\Microsoft Visual Studio\MyProjects\1111\1.c(9) : error C2065: 'k' : undeclared identifier
执行 cl.exe 时出错.
1.obj - 1 error(s), 0 warning(s)
|
最佳答案
查看完整内容
这是网上的一段程序!
其中你把int i=1,j=2,k3;这句复制错了,应该是
int i=1,j=2,k=3;我用DEVC++编译通过!运行成功!
|