hope this helps..
Code:
/*function prototypes */
void menu(void);
void game(void);
int main(void)
{
menu();
return 0;
}
void menu(void) {
int selection;
printf("1. Start Game\n");
printf("2. Exit \n");
printf("\nPlease Choose an option: \n");
scanf("%d", &selection);
switch (selection) {
case 1: game();
break;
case 2: exit(0); /* exit game */
default: printf("Invalid selection\n");
menu(); /* simple recursion, can be accomplished with while(); */
}
}
void game(void)
{
/* insert game-code here */
}