To find the HCF of two numbers given. (Qbasic Code)

To find the HCF of two numbers given. (Qbasic Code)
  • CLS
    INPUT "Enter the first number"; a
    INPUT "Enter the second number"; b
    m = a
    n = b
    WHILE a <> 0
        r = b MOD a
        b = a
        a = r
    WEND
    PRINT "HCF is "; b
    END

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.