breaking the while [SOLVED]
Hi there - simple task: reading 99 letters from stdin using getchar() and concatenate them to a string. then printing the string. if there was a input, that wasnt a letter (a..z, A..Z) exit the program. Code: while(count < 99) { input = getchar(); if((input >= 65 && input <= 90) || (input >= 97 && input <= 122)) { chararray[count] = input; count++; } else { printf("The last one wasnt a letter!"); break; } } Now the prob: without pressing return, the program never breaks the while-loop. but return is identified as a non-letter. even if i enter more than 100 letters and count is already at its limit, the while wont get broken. how to handle this? greetings!