Anonymous
public text v1 · immutable#include <curses.h>
int main()
{
int ch;
initscr();
while(1) {
addstr("1. Continue\n");
addstr("2. Exit\n");
ch = getch();
if (ch == '1')
addstr("\nGood!\n");
else if (ch == '2') {
addstr("\nZZAAPP!\n");
endwin();
exit(0);
}
else {
addstr ("\nUnknown command\n");
}
}
return 0;
}