是C的不完美吗?

作者在 2008-09-18 22:39:47 发布以下内容
大仲马(418724762)  22:18:07
#include <stdio.h>
main()
{
 double float x,y;
 x=2;
 y=x+3/2;
 printf("y=%lf",y);
}

大仲马(418724762)  22:18:21
有一个错误,不知是哪个?

.<liulangersate@yahoo.cn>  22:18:55
void main()

大仲马(418724762)  22:19:25
不对

小力(877929878)  22:20:38
double float

.<liulangersate@yahoo.cn>  22:21:24
我测试了,答案没错啊

.<liulangersate@yahoo.cn>  22:21:36
你那程序double float 
 
.<liulangersate@yahoo.cn>  22:21:44
是double 吧

大仲马(418724762)  22:22:48
恩,出来了

大仲马(418724762)  22:23:02
怪了,float还不能加

.<liulangersate@yahoo.cn>  22:23:42
double =long float
当然没有long float 这种数据类型,知识说明一下

大仲马(418724762)  22:28:17
呵呵,看来要注意的细节还是蛮多的

大仲马(418724762)  22:29:00
比如整型可以long int.实型double float就不行

大仲马(418724762)  22:31:30
按理long int和long 是合法的,那么double float和double也应该合法才对啊

大仲马(418724762)  22:32:32
哎,给C学习者制造一个考点和误区
C语言 | 阅读 3494 次
文章评论,共0条
游客请输入验证码
浏览29224次
文章归档