📜  如何在 c 中读取键盘输入 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:45.557000             🧑  作者: Mango

代码示例2
#include 

int main(int argc, char *argv[])  
{
    printf("Enter some keys\n");
    char c;
    while((c = getchar()) != 13)   /* 13 is carriage ret in ascii, enter key */     
        printf("%c\n", c); 

    return 0;
}