If I was building an APP to accept 3 soccer results from a user,how would I code it to display the two highest scores and the average of the highest two scores.
I have tried this but as usual everything works but the scores are wrong and I dont get the average.
So mines pretty much useless.
Thanks
Charlie
Private Sub cmdStart_Click()
'Declare required storage
Dim Home As Integer
Dim Away As Integer
Dim Draw As Integer
'Invite user to input scores
Home = InputBox("Please input first score ", "Score 1")
Away = InputBox("Please input second score ", "Score 2")
Draw = InputBox("Please input third score ", "Score 3")
If Home > Away Then
picMessage.Print "The highest scores are "; (Home)
ElseIf Away > Home Then
picMessage.Print "The highest scores are "; (Away)
Else
picMessage.Print "The highest scores are "; (Draw)
End If
This message was edited by Charlie on 2002-10-17 19:12
I have tried this but as usual everything works but the scores are wrong and I dont get the average.
So mines pretty much useless.
Thanks
Charlie
Private Sub cmdStart_Click()
'Declare required storage
Dim Home As Integer
Dim Away As Integer
Dim Draw As Integer
'Invite user to input scores
Home = InputBox("Please input first score ", "Score 1")
Away = InputBox("Please input second score ", "Score 2")
Draw = InputBox("Please input third score ", "Score 3")
If Home > Away Then
picMessage.Print "The highest scores are "; (Home)
ElseIf Away > Home Then
picMessage.Print "The highest scores are "; (Away)
Else
picMessage.Print "The highest scores are "; (Draw)
End If
This message was edited by Charlie on 2002-10-17 19:12