Friday, 23 March 2018

Calculation of Surface Area Volume and Diagonal of a Cube


Public Class Form1
    Dim a, sa, vol, diag As Single
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        a = TextBox1.Text
        sa = 6 * a * a
        vol = a ^ 3
        diag = (3 * a * a) ^ (1 / 2)
        TextBox2.Text = sa
        TextBox3.Text = vol
        TextBox4.Text = diag

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class

No comments:

Post a Comment

Note: only a member of this blog may post a comment.