Here's a Python code that implements the steps you've described:

```python
def euclidean_algorithm(num1, num2):
    if num1 <= 0 or num2 <= 0:
        return "Both numbers should be positive integers."

    a = max(num1, num2)
    b = min(num1, num2)

    while b != 0:
        q = a // b
        r = a % b
        a = b
        b = r

    return a

# Test the function with two positive integers
num1 = 36
num2 = 24
result = euclidean_algorithm(num1, num2)
print(f"The greatest common denominator of {num1} and {num2} is: {result}")
```

You can test this code by providing two positive integers as inputs in the `num1` and `num2` variables. This code will calculate the greatest common denominator using the Euclidean algorithm as described in the steps provided.