设计程序:要求在“输入数据”框中输入一个数字,当单击“计算”命令按钮时,将输入数据的立方显示在另一个文本框中,同时为退出命令按钮编写相应的程序
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim n As Int16 = Val(TextBox1.Text)
TextBox2.Text = Str(n * n * n)
End Sub
张志晨