Create a program in Visual Basic to calculate the number of pieces of fruit Inglebert has with the given numbers.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Declare variables
Dim A, O, pieces As Integer
'Set values
A = 15
O = A * 3
pieces = A + O
'Display results
MessageBox.Show("Inglebert has " & pieces & " pieces of fruit.")
End Sub
End Class
No comments:
Post a Comment