Answers for "read enter in c"

C
0

read enter in c

char prev = 0;

while(1) {
    char c = getchar();
    if (c == '\n' && prev == c) break; // double return pressed!
    prev = c; 
}
Posted by: Guest on January-17-2021

Code answers related to "C"

Browse Popular Code Answers by Language