Question: Please use MatLab to solve. E.3 Largest Digit Write a function named find Largest Digit that finds the largest digit in a integer. Some Tips:

E.3 Largest Digit Write a function named find Largest Digit that finds

Please use MatLab to solve.

E.3 Largest Digit Write a function named find Largest Digit that finds the largest digit in a integer. Some Tips: 1. To check if x is an integer - divide x by 1 and see if the reminder is 0. My Solutions 2. To pick the last digit -- divide x by 10 and find the reminder. The function rem() might be useful here. 3. To get rid of the last digit of x-- substract that reminder found in 1) from x and divide by 10 For example, the reminder of 12345/10 is 5 and (12345 - 5)/10 = 1234. 4. What kind of loop will allow you to go through all of the digits of x? Here are 4 example runs: >>>ld findLargestDigit (12345) >> largestD = findLargestDigit (-234) ld- largestD = 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!