I am trying to finish my final project. I am very close but stuck on the last three things I need to complete.

1. I am trying to get a sub menu into the first menu of my switch case statement. The statements are in the subMenu function;
however they show on the same page as the instructions menu, how can I have it show a submenu for this function in the instructions menu?


2. I am trying to get my computer_guess function to stop looping infinitely. It loops infinitely if I enter a char I keep getting these errors. 35 [Error] 'EOF' undeclared (first use in this function)


35 each undeclared identifier is reported only once for each function it appears in. Is there way to delcare EOF?


3. I am trying to validate the input for the computer_guess function to only ints.


Code:
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctype.h>


void instructions() {
    printf("\nHere are the instructions:\n");
    printf("1. Pick a number between 1 and 100 and the computer will tell you if it's too high or too low.\n");
    printf("2. Pick a number between 1 and 100 and the computer will tell you \n if it's too high or too low and validate your input.\n");
}


void subMenu() {
    printf("Additional instructions:In game one you must guess my secret number between 1 and 100. I will tell you when you're correct");
    printf("In game two the computer will select a random number from 1 to 100 and you have to guess it");
}


void user_guess() {
       int secretnum=5, guess, tries = 0;


    printf("Guess My Secret Number Game\n\n");


// Takes user input and compares it to the secret number stored in the secretnum variable
    
    do
    {
        printf("Guess My Secret Number. It's between 1 and 100 : ");
        scanf("%d", &guess);
        tries++;


        if (guess > secretnum)
        {
            printf("Too high!\n\n");
        }
        else if (guess < secretnum)
        {
            printf("Too low!\n\n");
        }
      
       else if (guess == secretnum)
        {
            printf("That is correct!");
        }
      
    }while (guess != secretnum);


    return 0;
    
}


void computer_guess() {
      int num, guess, tries = 0;
    srand(time(0)); /* seed random number generator */
    num = rand() % 100 + 1; /* random number between 1 and 100 */


    printf("Guess The Computer's Number Game\n\n");


// Takes user input and compares it to the random number chosen
    
    do
    {
        printf("Enter a guess between 1 and 100 : ");
        scanf("%d", &guess);
    while(flush=getchar() != EOF && flush != '\n');//I get 2 errors
        tries++;


        if (guess > num)
        {
            printf("Too high!\n\n");
        }
        else if (guess < num)
        {
            printf("Too low!\n\n");
        }


    else if (scanf("%d" = isalpha);


    {


    printf("Please enter a valid number between 1-100.");


    }
      
    }while (guess != num);


    return 0;
    
}


main(void)
{   
int menu_choice;


printf("\tGUESSING GAME \n");
//Menu list of choices


printf("1. Show Me The Instructions.\n");
printf("2. Guess My Secret Number.\n");
printf("3. Guess The Computer's Secret Number.\n");
printf("0. Quit\n");
do
{
printf("Enter your choice: ");
scanf(" %d", &menu_choice);
switch (menu_choice)
{
case (1): instructions();
    
case(2): subMenu();
    break;


case (3): user_guess();
          
    break;


case (4): computer_guess();
    break;


case (5): exit(1); //Exits the program.
    break;
               //Validates input
    default: printf("\n%d is not a valid choice.\n", menu_choice);
printf("Try again.\n");
break;
}
} while ((menu_choice < 1) || (menu_choice > 4));
return 0;
}