现在的位置: 首页 > 综合 > 正文

有关c语言单精度问题,跪求帮忙解决,若详细,感激不尽。。

2013年04月18日 ⁄ 综合 ⁄ 共 332字 ⁄ 字号 评论关闭

#include<stdio.h>

main(){   

             double a,b,c;   

            scanf("%f %f",&a,&b);   

            c=a+b;   

            printf("%f",c);

           }

为什么上面的程序执行的结果是这个

#include<stdio.h>

main(){

            double a,b,c;

             scanf("%lf %lf",&a,&b);

             c=a+b;

             printf("%lf",c);

            }

为什么这个程序中加个l就编程这样。求解!!!!!!!!!!!

抱歉!评论已关闭.