Results 1 to 2 of 2

Thread: Tallying scores

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    Trinidad, West Indies
    Posts
    3
    I wish to build a program in which four (4) sporting teams are each competing in thirteen (13) events. Let's call those teams: T1, T2, T3 and T4. And we can call the events, E1, E2, E3 to E13.
    What is the shortest way to write codes to add the score of each team for all thirteen events?

  2. #2
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625
    what about a databse or even an array containing their names and scores...

    Code:
    Dim T(1 To 4, 1 To 13) As Long
    Dim Num(1 To 4) As Long
    Dim i, j As Integer
    
    'declarations
    ....
    Label1.Caption = ""
    
    For i = 1 To 4
        For j = 1 To 13
            Num(i) = Num(i) + T(i , j)
            Label1.Caption = Label1.Caption & "Team " & i & ": " & Num(1)
        Next j
    Next i
    or you could use a 'type' definition.... look-up 'type' in the help section or contact me for more info

    Good Luck
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width