Array GCD - MATLAB Cody - MATLAB Central

Problem 1018. Array GCD

Difficulty:Rate
  • Find Greatest Common Divisor in a given array
  • Function Template:
function ans = arraygcd(a)
   % a=[45 15 200 300];
   5;
end

Solution Stats

57.32% Correct | 42.68% Incorrect
Last Solution submitted on Oct 25, 2025

Problem Comments

Solution Comments

Show comments
Join Cody Contest 2025 — Have Fun and Win Prizes!
...
We’re excited to invite you to Cody Contest 2025! 🎉 Pick a team,...

Problem Recent Solvers106

Suggested Problems

More from this Author100

Problem Tags

gcd

Community Treasure Hunt

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

Start Hunting!