📜  读入-C编程语言代码示例

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

代码示例1
char prev = 0;

while(1) {
    char c = getchar();
    if (c == '\n' && prev == c) break; // double return pressed!
    prev = c; 
}