Huge noob here trying to teach himself VB. I need to compute the percentage of games won and games lost. I keep getting errors and it's driving me up a wall. I've changed my code so many times that I don't really remember what it was like when I started. Any help would be greatly appreciated, Thanks in advance.
Private Sub btnPercentage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPercentage.Click
Dim team As String
Dim won, lost, percentage As Integer
team = CStr(txtTeam.Text)
won = CInt(txtGamesWon.Text)
lost = CInt(txtGamesLost.Text)
percentage = CInt(txtPercent.Text)
percentage = (won + lost) / 2
txtPercent.Text = team & " won" & percentage & " of its games."