Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <ncurses.h>
  2.  
  3. int main()
  4. {
  5.     int n;
  6.  
  7.     initscr();
  8.     cbreak();
  9.     noecho();
  10.     scrollok(stdscr, 1);
  11.     nodelay(stdscr, 1);
  12.    
  13.     while (true)
  14.     {
  15.         if ((n = getch()) != -1)
  16.         {
  17.             printw("You pressed %d\n", n);
  18.         }
  19.  
  20.         napms(500);
  21.         printw("Running\n");
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement