To find the LCM 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
l = (m * n) / b
PRINT "LCM is "; l
END