as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
given three numbers, find the greatest common divisor (gcd) of the three numbers.
user
"""
given three numbers, find the greatest common divisor (gcd) of the three numbers
"""

# find the greatest common divisor (gcd) of two numbers
def find_gcd(a, b): 
    while b > 0: 
        a, b = b, a % b 
  
    return a 

# given three numbers, find the greatest common divisor (gcd) of the three numbers
def find_gcd_of_three_numbers(a, b, c): 
    gcd_a_b = find_gcd(a, b) 
    gcd_b_c = find_gcd(b, c) 
    gcd_a_c = find_gcd(a, c) 
  
    gcd = find_gcd(gcd_a_b, gcd_b_c) 
    gcd = find_gcd(gcd, gcd_a_c) 
  
    return gcd  

if __name__ == '__main__':
    print("gcd of 3 numbers is: ", end="") 
    print(find_gcd_of_three_numbers(18, 24, 30))
assistant