GCD of Two Numbers

    0

    0

    CrypticSai-08

    num1 = 36
    num2 = 60
    gcd = 1
    for i in range(1, min(num1, num2)):
        if num1 % i == 0 and num2 % i == 0:
            gcd = i
    print("GCD of", num1, "and", num2, "is", gcd)
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.