Write a program in Visual Basic to display the number of stuffed animals in a message box.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Declare variables
Dim C, S, TA As Integer
'Set values
C = 6
S = 7
TA = C + S
'Display results
MessageBox.Show("Morgan has " & TA & " stuffed animals.")
End Sub
End Class
No comments:
Post a Comment