- This is a solution.
First did you remember to prototype the function?
I did not include it in the skeleton
presented in a previous movie.
So I was seeing whether you paid attention.
Here is the prototype which is simply a copy
of the functions declaration at line 16.
And here's the content I came up with.
Your function could look like what you see here.
You may have done things subtly different,
but as long as the code works, then you succeeded.
I'm using an if, else if, else structure.
No curly brackets are required because each item
has only one statement that follows it.
Going to build and run.
Type in various values to see how it works, and it works.
Hopefully your solution works just as well.