console - I want to take in a word such as "NAV" from the command line and use it as a command -


im trying create text based adventure game. prompts user command nav shld phas lrs srs exit.

i make commands related numbers , way, not cool. want code able recognize 1 of these phrases has been entered in console , proceed there.

printf("nav   phas  lrs  shld   dock   exit  \n");     printf("command ? \n");     scanf("%c", &command); 

this how tried code work , needless not. variable "command" declared char "char command;"

thank can give me i've hit quite roadblock here :(