#include int main(){ printf("~ to exit"); for(;;) { char ch=getchar(); if(ch=='~') { break; } }} ~ to exit123 ~