My assignment is to make a word-hunter game. The user enters the coordinates and the associated word. Coordinates are in the same form as the ones in a chessboard (Ex: D7 combative) I'm scanning this as:
scanf(" %c%d %s", &ypos, &xpos, word);
The problem is, when the user types exit, the program should terminate but I scan not only for a string but also for a character, an integer and then for a string. How can I make the program terminate when the input is exit?