0
点赞
收藏
分享

微信扫一扫

C语言问题

暮晨夜雪 2022-03-12 阅读 86
c语言

代码

#include <stdio.h>

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;


int main(void)
{
    uint16_t b;
    uint32_t c;
    b = 32760;
    c = 32760;
    printf("b %d, %0.2f\n", (b-32768), (b-32768)*0.195);
    printf("c %d, %0.2f\n", (c-32768), (c-32768)*0.195);
    return 0;
}

运行结果

b -8, -1.56
c -8, 837518621.16

原因

举报

相关推荐

0 条评论