int main (void) { int menu = 0; /* initializes srand () */ init (); do { /* prints title and menu on screen */ printMainScreen (); /* requires user to choose a menu */ menu = chooseMenuItem (); switch (menu) { case START_GAME: startNewGame (); /* starts a new game */ break; case GAME_RULES: printGameRules (); /* prints the game rules */ break; case EXIT_GAME: printGoodbye (); /* prints a goodbye message */ break; } } while (menu != EXIT_GAME); return 0; }
void doTheThing(int type){ if (type == 0) { printHello(); }else{ printGoodbye(); } return 0; }