0% found this document useful (0 votes)
28 views4 pages

Parcial 1

This document contains code for a program that calculates the area and volume of different shapes. It includes code for calculating a square, rectangle, and parallelipiped. The user enters height and width/length values, and the area and volume are displayed. It is from a programming class assignment at the Technological University of Panama in Veraguas for students Jose Hernandez and Javier Quintero during the first semester of 2019.

Uploaded by

Monta de Toros
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

Parcial 1

This document contains code for a program that calculates the area and volume of different shapes. It includes code for calculating a square, rectangle, and parallelipiped. The user enters height and width/length values, and the area and volume are displayed. It is from a programming class assignment at the Technological University of Panama in Veraguas for students Jose Hernandez and Javier Quintero during the first semester of 2019.

Uploaded by

Monta de Toros
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Universidad Tecnológica De Panamá

Centro Regional de Veraguas

Facultad De Ingeniería civil

Asignatura: Programación

Taller # 2

Profesor:
Milka de Escobar

Estudiantes:
José Hernández
Javier Quintero

I Semestre 2019
Problema # 1

Public Class Form1


Private Sub cmdcuadrado_Click(sender As Object, e As EventArgs) Handles
cmdcuadrado.Click
Dim h, d As Integer
h = Val(Txtaltura.Text)
d = Val(txtRÓL.Text)
txtarea.Text = d ^ 2 / 2
txtvolumen.Text = 4 * h
PCuadrado.Visible = True
Prectangulo.Visible = False
Ppara.Visible = False
If Not IsNumeric(Txtaltura) Then
MsgBox(" valor errado")
End If

End Sub

Private Sub cmdrectangulo_Click(sender As Object, e As EventArgs) Handles


cmdrectangulo.Click
Dim h, D As Integer
h = Val(Txtaltura.Text)
D = Val(txtRÓL.Text)
txtarea.Text = D * h
txtvolumen.Text = 2 ^ D + 2 ^ h
Pcuadrado.Visible = False
Prectangulo.Visible = True
Ppara.Visible = False
If Not IsNumeric(Txtaltura) Then
MsgBox(" valor errado")
End If
End Sub
Private Sub cmdparale_Click(sender As Object, e As EventArgs) Handles
cmdparale.Click
Dim h, d As Integer
h = Val(Txtaltura.Text)
d = Val(txtRÓL.Text)
txtarea.Text = d * h
txtvolumen.Text = 2 ^ d + 2 ^ h
Pcuadrado.Visible = False
Prectangulo.Visible = False
Ppara.Visible = True
If Not IsNumeric(Txtaltura) Then
MsgBox(" valor errado")
End If

End Sub
End Class

You might also like