find "greatest common divisor" of two integer value - MATLAB Cody - MATLAB Central

Problem 42966. find "greatest common divisor" of two integer value

Difficulty:Rate

A function to find Greatest Common Divisor of two integer input E.G. x=-18 y=96

output should be +6

x=-18; y=96; >>your_GCD(x,y) ans =

     6

Solution Stats

74.45% Correct | 25.55% Incorrect
Last Solution submitted on Sep 03, 2025

Solution Comments

Show comments
MATLAB EXPO 2025 Registration is Now Open! November 12 – 13, 2025
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025...
0

Problem Recent Solvers197

Suggested Problems

More from this Author2

Problem Tags

Community Treasure Hunt

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

Start Hunting!