/* break.c */ #include int main(void) { int c; while(1){ c=getchar(); if (c=='q') break; } printf("qが入力されました\n"); return 0; }