ex5-3.c

来自「这是《Keil Cx51 V7.0单片机高级语言编程与uVision2应用实践》」· C语言 代码 · 共 22 行

C
22
字号
    #include<stdio.h>
    #include<reg51.h>
    struct mepoint  {
        unsigned char name[11];
        unsigned char pressure;
        unsigned char temperature;
     };
    struct mepoint po[3]=
     {
      { "1stpoint", 0x99, 0x64 },
      { "2ndpoint", 0x10, 0x20 },
      { "3tdpoint", 0x15, 0x18 }
     };
    void main(void)  {
        unsigned char i;
        printf("No.   point      pressure   temperature \n");
        for (i=0; i<3; i++)
        printf("%bd     %s      %bx           %bx\n",
                  i+1,po[i].name,po[i].pressure,po[i].temperature);
        while(1);
     }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?