You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
351 B
20 lines
351 B
#include <ncurses.h>
|
|
#include <string.h>
|
|
|
|
int main()
|
|
{
|
|
char * mesg = "Enter a string: ";
|
|
char str[80];
|
|
int row, col;
|
|
|
|
initscr();
|
|
getmaxyx(stdscr, row, col);
|
|
mvprintw(row / 2, (col - strlen(mesg)) / 2, "%s", mesg);
|
|
getstr(str);
|
|
mvprintw(LINES - 2, 0, "You Entered: %s", str);
|
|
getch();
|
|
endwin();
|
|
|
|
return 0;
|
|
}
|