#include <stdio.h>
#include <stdlib.h>
#include<string.h>
int main(int argc,char *argv[])
{
float temp=65519;
if (((short)temp) & 0x8000) //负数
{
printf("负 %f\n", (-1)*((float)((~(short)temp)+1))/10 ); //负 -1.700000
}
else
{
printf("正 %f", temp / 10);
}
return 0;
}
C语言温度负数
猜你喜欢
转载自blog.csdn.net/chenhao0568/article/details/103764154
今日推荐
周排行