idata=10000
dim arrey_yin(idata)as integer
dim yin_index as integer=0
dim b_yin as boonlean
for i as integer=2 to 10000
b_yin=false
for j as integer=2 to i-1
if i mod j=0 then
b_yin=true
exit for
end if
next
if b_yin=false then
arrey_yin(yin_index)=i
yin_index+=1
end if
next
dim yin_arr() as integer
dim yinarr_index as integer=0
dim h as integer=0
for i as integer=0 to yin_index-2
h=0
for i as integer=0 to yin_index-2
if idata mod array_yin(i)=0 then
yin_arr(yinarr_index)=arrey_yin(i)
yinarr_index+=1
idata=idata\array_yin(i)
exit for
end if
next
if idata=1 then
exit for
end if
next
dim data1.data2 as single
data1=cint(rnd()*100)
data2=cint(rnd()*100)
dim iright,ierror as integer
dim sum_data as single=data1+data2
if sum_data=cint(textbox1)then
iright+=1
else
ierror+=1
end if
6
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim aa As Integer = Val(TextBox1.Text)
Dim i As Integer
For i = 2 To aa
If aa Mod i = 0 Then
TextBox