Question: Answer as soon as possible please Use recursion to write a function max digle that returns the largest digt that appears in a number n
Answer as soon as possible pleaseUse recursion to write a function max digle that returns the largest digt that appears in a number n when represented in decimal (base 10). For example, 1231 has max digit 3. You can assume that is positive and at most 9 digits long. In the main function perform at least five tests of max digit and use assert to check that the returned value is correct. Your function must have the following prototype: int max digitoint Carefully follow all of the following instructions. Not following these instructions will result in losing marks Submit only a single file .C containing the source code, do not submit anything else such asa zip file Your C source code must compile without errors Your source code must be Indented properly. Do not change the function prototype. Do not use global or static variables Provide a comment before your implementation describing what it does and any requirements on the input parameters). Your tests should cover all edge cases. You are not required to deal with or test invalid input - Provide a comment at the bottom of your source code explaining your implementation and why it works. This should be written in English with proper grammar
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
