Below we see a function which calculate the [[Greatest Common Divisor (GCD)]]of two positive integers $m$ and $n$.
This one which takes a "brute force" approach, testing all the values between 1 and the least of $m$ and $n$ in ascending order, the last common factor found will be the highest common factor, which should be returned.
### Implementation
```run-python
def brutegcd(m,n):
a = min(m,n)
b = max(m,n)
for i in range (1,a+1):
if a%i == 0 and b%i ==0:
gcd = i
return gcd
# test
print(brutegcd(56,28))
```