10-11-13, 10:54 PM
كود :
Dim MCG(10) As Double
MCG(0) = Val(ComboBox1.ValueMember)
MCG(1) = Val(ComboBox2.ValueMember)
MCG(2) = Val(ComboBox3.ValueMember)
MCG(3) = Val(ComboBox4.ValueMember)
MCG(4) = Val(ComboBox5.ValueMember)
MCG(5) = Val(ComboBox6.ValueMember)
MCG(6) = Val(ComboBox7.ValueMember)
MCG(7) = Val(ComboBox8.ValueMember)
MCG(8) = Val(ComboBox9.ValueMember)
MCG(9) = Val(ComboBox10.ValueMember)
Max = MCG(0)
For i=1 to 9 do
If Max > MCG(i) Then Max = MCG(i)
Next i
End if
For i = Max to 48 do
If MCG(0) mod i = 0 and MCG(1) mod i = 0 and MCG(2) mod i = 0 and MCG(3) mod i = 0 and MCG(4) mod i = 0 and MCG(5) mod i = 0 and MCG(6) mod i = 0 and MCG(7) mod i = 0 and MCG(8) mod i = 0 and MCG(9) mod i = 0 and
ff = i
Next i
TextBox1.Text = ff
End if