Write a qbasic program to display the LCM of any two input numbers.

ALK
By -
0











CLS


INPUT "Enter any two numbers ";a , b


FOR j=1 TO a


       IF a MOD j=0 AND b MOD j=0 THEN 


              Hcf=j


       END IF


NEXT j


LCM=(a*b)/Hcf


PRINT "LCM= ";LCM


END



Post a Comment

0Comments

Feel free to leave your comment below or get in touch with me on WhatsApp/Viber number: +9779844128670

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Learn more
Ok, Go it!