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

73.58% Correct | 26.42% Incorrect
Last Solution submitted on May 06, 2025

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Group

Prográmky Image
Prográmky
  • 10 Problems
  • 84 Finishers

Problem Recent Solvers189

Problem Tags

Community Treasure Hunt

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

Start Hunting!