#include
#include
#define SIZE 50
#define x 32
#define y 9
#define z 5
float ctof(float F,float c)
{
F= x+c*y/z;
return (F);
}
int main(void)
{
float F=0, c;
for(c=-1000; c<=1500;c+=SIZE)
{
ctof(F,c);
printf("%12.4f℃ %12.4fF\n", c, ctof(F,c));
}
system("pause");
return 0;
}
把函数从整形换为浮点型试试