#include /* * Example program that demonstrates use of function to print out a user menu * CISC 105 06.20.05 * Sara Sprenkle */ /* Defines the value for the option to quit. */ #define QUIT 0 /* * Prints a pretty menu to the user. */ void printMenu( ) { printf("\n++++++++++++++++++++\n"); printf(" User Menu \n"); printf("++++++++++++++++++++\n"); printf("Choose one of the following options: \n"); printf("1. Option 1.\n"); printf("2. Option 2.\n"); printf("...\n"); printf("0. Quit \n"); printf("Your choice: "); /* return is not required */ return; } int main() { int option; do { printMenu(); scanf("%d", &option); } while( option != QUIT ); }