The problem I'm having is that with my If statement un-commented out, the select statement drops straight to the default and skips all the other cases. Right now I have the If statement commented out and the select case works fine. If the user enters a distance value less than 0 or greater than 10,000 I need it to stop and display an error message. Likewise, if the user doesn't enter either air, water, or steel I need it to display an error message.
I think you are trying to do too much all at once. Start by getting the input, not in the main method. The main method should ideally contain one statement. That starts off your app, which calls separate methods for keyboard input, choice, printing messages, calculating the speed, etc. By the way, your comment is not quite right; 1100 is how far (in feet) sound travels in air in 1 second.
Added later:- [If you split up the task into multiple methods you can run each method individually and see they each work, before you try putting it all together.]
And the example in the link does show only one statement in the main method; the first line is a declaration. You can run those together as a single line:-
Why fit in when you were born to stand out? - Seuss. Tiny ad: