All pastes #781812 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-19 00:22 UTC
rendered paste body
#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;
}