Sorry for the long title...
trying to figure out how to create a user menu for a pedometer program that tracks a single user for 7 days.
I am a complete noob.
I need my menu to ask for the user name to get started and then obviously not ask for it again.. then it needs to have them enter their weight. here is what i have so far:
/* thanks for the help!Code:#include <stdio.h> void userMenu (void); int getSelection(void); int main (void) { int menuOption; userMenu(); menuOption = getSelection(); if (menuOption == 1) { printf("enter name\na,weight\n"); } return(0); } void userMenu (void) { printf (" 1 - Create user\n"); printf (" 2- Edit user\n"); printf (" 3 - Start recording\n"); printf (" 4 - Reports\n"); printf (" 5 - Quit \n"); } int getSelection(void) { int option; do { printf("Please choose 2 - 5"); scanf("%d", &option); } while (option > 5 || option <1); return (option; }