回覆列表
  • 1 # 使用者3456175603979

    char ch;

    ch=getchar();

    if(ch>="0"&&ch

    printf("數字");

    if(ch>="a"&&ch="A"&&ch

    printf("字母");

    2.

    #include

    int main(){

    char char1 = 184;

    char char2 = 246;

    printf("Print1:\n");

    printf("%c",char1);

    printf("\n");

    printf("%c", char2);

    printf("\n Print2:\n %c%c\n",char1, char2);

    printf(" Print3:\n ");

    printf("%c",char1);

    printf("%c",char2);

    return 0;

    }

    讓我們來看一下結果:

    所以我們還可以這樣玩:

    #include

    #include

    int main(){

    char hexchar[19] = {0xc1,0xd6,0xb2,0xd3,0xb1,0xf3,0x2c,0x20,0x49,0x20,0x4c,0x6f,,0x76,0x65,0x20,0x59,0x6f,0x75,0x21},i;

    for(i=0;i

    printf("%c",hexchar[i]);

    _sleep(300);

    }

    return 0;

    }

  • 中秋節和大豐收的關聯?
  • 腿上起幹皮怎麼辦?