#include <stdio.h> int main( ){float f,c;f=64.0;c=(5.0/9)*(f-32);printf("f=%f\nc=%f\n",f,c)return 0;}出现警告,conversation from 'double'to'float'不改变变量类型,依然用float定义为单精度浮点数变量,进行算术运算,怎么修改代码?
在64.0后面加f;即:f=64.0f;