为了账号安全,请及时绑定邮箱和手机立即绑定

能不能用两个float? 为什么非要加用一个double

#include <stdio.h>
int main()
{
    char c = 'a';
    int n =         //将c赋值给n
    float f =       //将c赋值给f
    double d =      //将c赋值给d
    printf("%d\n",n);
    printf("%f\n",f);
    printf("%lf\n",d);
    return 0;   
}


正在回答

1 回答

#include <stdio.h>
int main()
{
    char c = 'a';
    int n =        c;     //将c赋值给n
    float f =      c; //将c赋值给f
    double d =    c;  //将c赋值给d
    printf("%d\n",n);
    printf("%f\n",f);
    printf("%lf\n",d);
    return 0;   
}

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

能不能用两个float? 为什么非要加用一个double

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信