warning C4244: '=' : conversion from 'double ' to 'float '
帮忙看看吧很简单的一个程序谢谢#include<stdio.h>intmain(){floatf,c;//定义f,c为单精度浮点型变量scanf("%f",&f);c=(...
帮忙看看吧 很简单的一个程序 谢谢
#include<stdio.h>
int main()
{
float f,c; //定义f,c为单精度浮点型变量
scanf("%f",&f);
c=(5.0/9)*(f-32);//提示出错warning C4244: '=' : conversion from 'double ' to 'float ', possible loss of data
printf("the result=%f\n",c);
return 0;
} 展开
#include<stdio.h>
int main()
{
float f,c; //定义f,c为单精度浮点型变量
scanf("%f",&f);
c=(5.0/9)*(f-32);//提示出错warning C4244: '=' : conversion from 'double ' to 'float ', possible loss of data
printf("the result=%f\n",c);
return 0;
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询