Largest Prime Factor - MATLAB Cody - MATLAB Central

Problem 59821. Largest Prime Factor

Difficulty:Rate
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

0.0% Correct | 100.0% Incorrect
Last Solution submitted on Mar 31, 2025

Problem Comments

Solution Comments

Show comments
Registration Now Open for MathWorks AUTOMOTIVE CONFERENCE 2025
...
Hello Community, We're excited to announce that registration is now open for the...

Problem Recent Solvers0

No solvers yet, be the first player to solve this problem.

Suggested Problems

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page