Code:
int menu(void)
{
int selection=-1;
do
{
puts("Welcome to C Programming's Message board\nPlease make your selection\n");
puts("1) I would like to post some code");
puts("2) I am a lazy dumb arse");
puts("3) I'm not sure if I'm being insulted or not");
puts("4) I could swear void main() was my friend");
puts("selection: ");
if ( scanf("%d, &selection) != 1 )
{
int ch;
while ( (ch=getchar()) != ' ' );
selection = -1;
}
else
if ( selection <= 0 || selection > 4 )
puts("Wow you really are dumber then you look");
}while (selection <= 0 || selection > );
return selection;
}