You also need to have at least the function's prototype appear before main in order to call it.

That's unfortunate that they ask you to use a switch statement. It is possible to correctly convert...