#include #include int main(void) { char c; int count=1; initscr();cbreak();noecho(); clear(); printw("Hit '+'/'-' key to count up/down, 'q' to exit.\n"); printw("%d\n",count); refresh(); while((c=getchar()) != 'q'){ if(c == '+')count++; if(c == '-')count--; printw("%d\n",count); refresh(); } endwin(); }