I have a problem determining the greatest common divisor of any two numbers. The question goes as follows;

The greatest common divisor (GCD) of two integers is the largest integer that evenly divides each of the two numbers. Write a function gcd the "gcd" that returns the greatest common divisor of two integers.

This question is taken from INTRODUCING C++ AND JAVA /HOW TO PROGRAM C ( THIRD EDITION ) AUTHOR: DEITEL & DEITEL

PLEASE I WILL BE GRATEFUL IF THIS PROBLEM IS SOLVED AND REPLIED TO ME QUICKLY.

THANKS

MIKE