الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

can anyone find my mistake in coding

مغلق
بدأه aNa_7ab0o0b في 12 يونيو 2004 · 1 رد · 462 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

hi everyone .....

i did this example and i thought that i finished from it ... but there is a small mistake and the problem i dont know what is it .... this is the coding and am gonna put the GUI picture with it so everyone will know what is the mistake ... so please help me

Option Base 1

Option Explicit

Private Sub cmdExit_Click()

End

End Sub

Private Sub cmdStart_Click()

Dim i, j, r, P As Integer

Dim Count(20) As Integer

Dim found As Boolean

Dim F As Integer

Randomize

P = 1

txtDuplication = ""

found = False

lstOriginal.Clear

Randomize

For i = 1 To 20

Count(i) = Int(91 * Rnd()) + 10

lstOriginal.AddItem i & " -->" & Count(i) & ""

Next i

For i = 1 To 20

If (Count(i) = r) Then

found = True

Count(P) = i

P = P + 1

End If

Next i

For i = 1 To 20

F = Count(i)

For j = 1 To i - 1

If Count(j) = F Then

lstOriginal.List(i - 1) = lstOriginal.List(i - 1) & " (Duplicate)"

txtDuplication.Text = "Found!!"

Else

txtDuplication.Text = "notFound!!"

End If

Next j

Next i

End Sub

**************************************************

1.zip

#2

this is the second picture

i'll be thank full if you helped me

2.zip

هذا الموضوع مغلق.

مواضيع مشابهة