Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Jun 29th, 2007, 2:30 PM   #1
boatn19
Newbie
 
Join Date: May 2005
Location: Charleston, SC
Posts: 11
Rep Power: 0 boatn19 is on a distinguished road
only displays 1 number not 6

the following code is only displaying one number and I am trying to get it display six numbers
        Dim number(5) As Integer
        Dim subscript As Integer
        Dim searchSubscript As Integer
        Dim isFound As Boolean
        Dim raNumber As Integer
        Dim randomGenerator As New Random

        number(0) = 5
        subscript = number(1)
        Do While subscript < number.Length
            raNumber = randomGenerator.Next(1, 54)
            searchSubscript = 0
            Do While searchSubscript < subscript
                isFound = False
                If searchSubscript = raNumber Then
                    isFound = True
                Else
                    searchSubscript = searchSubscript + 1
                End If
            Loop
            If isFound = False Then
                subscript = raNumber
                subscript = subscript + 1
            End If
        Loop
        'display the numbers
        Me.xLotteryLabel.Text = (subscript.ToString())
    End Sub
End Class
boatn19 is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
c-unix-childprocesses-random number programmingnoob C 7 Feb 6th, 2007 8:39 PM
Unix commands compatible with Windows? titaniumdecoy Bash / Shell Scripting 7 Oct 5th, 2006 7:25 AM
Jython Jessehk Coder's Corner Lounge 2 Feb 5th, 2006 4:35 AM
[tutorial] Python for programming beginners coldDeath Python 30 Dec 14th, 2005 11:35 AM
FiveDigit + RandomeNumber Game. TecBrain Java 0 Nov 18th, 2005 2:53 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:35 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC