Write a function largest_prime_factor(n) that takes a positive integer n as input and returns the largest prime factor of n. A prime factor is a factor that is a prime number. For example, the largest prime factor of 12 is 3.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers1
Suggested Problems
-
1 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
The "end" does not allow the solution to work, for future reference try using the reference solutions to verify the test suite is passable.