Introduction to Functions (part 1)

This lesson contains approximately 22 minutes of video content.

Writing functions well

Activity: Largest digit within an integer value

You will write your solution to this problem within the body of `LargestDigit`. I understand that we haven't discussed functions in detail yet. You need to know that our auto-grader will invoke your implementation (the code within the function body) of `LargestDigit` with different arguments that will become stored in the parameter `number`. Your solution should be written with respect to `number`.
To summarize, you are to find the largest digit within `number`. For example, if our auto-grader calls `LargestDigit(1234)`, your solution should return `4`. Likewise, for `LargestDigit(784)`, your implementation would return `8`.
You will define `LargestDigit` in `fun.cc`. You can test your implementation in `driver.cc` by calling `LargestDigit` with different arguments.
Consider only the cases where the parameter `number` is greater than or equal to zero.