Ask for advice to write a program in VB. Find the least common multiple of two natural numbers m and N. is this right? Dim a%,b%,t%,i% A = InputBox ("the first number"): B = InputBox ("the second number") If a

Ask for advice to write a program in VB. Find the least common multiple of two natural numbers m and N. is this right? Dim a%,b%,t%,i% A = InputBox ("the first number"): B = InputBox ("the second number") If a


Here's another solution: Dim a as longdim B as longdim t as longa = 42b = 30t = adim result as longresult = 1for I = 1 to t if (a mod I) = 0 and (b Mod I) = 0 then a = A / I B = B / IR



Xiaoqiang gives Xiaogang 1 / 5 of the stamps, and Xiaogang gives Xiaoqiang 1 / 3 of the stamps. At this time, they each have 180 stamps
How many stamps did Xiaoqiang and Xiaogang have?


The second time, xiaogangyou = 180 (1-1 / 3) = 270 pieces;
Xiaoqiang = 180 × 2-270 = 90 pieces;
Xiaoqiang original = 90 (1-1 / 5) = 112.5 pieces;
Xiaogang original = 360-112.5 = 247.5 sheets;
This number is not an integer



Xiaomin and Xiaogang are both stamp collectors. Xiaomin's number of stamps is 34 times that of Xiaogang's. If Xiaogang gives Xiaomin 9 stamps, their number of stamps will be equal. Do you know how many stamps Xiaogang has? (solved by equation)


If Xiaogang has x stamps, Xiaomin will have 34x. According to the meaning of the question, we can get the equation: X-9 = 34x + 9, 14x = 18, & nbsp; X = 72