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

Ticona Laura, Kevin Ronald Lenguaje de Programacion Ii: Ejercicio 1 - Area Y Longitud de Una Circunferencia

The document contains code for 3 exercises calculating area and perimeter of shapes. The first calculates the area and circumference of a circle. The second calculates the perimeter and area of a triangle using base and height. The third calculates the area of a rhombus using base lengths and height.

Uploaded by

Kevin Ticona
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)
46 views4 pages

Ticona Laura, Kevin Ronald Lenguaje de Programacion Ii: Ejercicio 1 - Area Y Longitud de Una Circunferencia

The document contains code for 3 exercises calculating area and perimeter of shapes. The first calculates the area and circumference of a circle. The second calculates the perimeter and area of a triangle using base and height. The third calculates the area of a rhombus using base lengths and height.

Uploaded by

Kevin Ticona
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

TICONA LAURA, KEVIN RONALD

LENGUAJE DE PROGRAMACION II
EJERCICIO 1 – AREA Y LONGITUD DE UNA CIRCUNFERENCIA
Public Class Form1

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


Button1.Click
Dim radio, pi, area, longitud As Double

pi = 3.1416
radio = txtRadio.Text

area = pi * radio * radio


longitud = 2 * pi * radio

txtArea.Text = area
txtLongitud.Text = longitud

End Sub
End Class
EJERCICIO PROPUESTO 1 – AREA Y PERIMETRO DE UN TRIANGULO

Public Class Form2

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


procesar.Click

Dim base, altura, perimetro, area As Double

base = txtBase.Text
altura = txtAltura.Text

perimetro = 2 * (base + altura)


area = base * altura

txtArea.Text = area
txtPerimetro.Text = perimetro

End Sub
End Class
EJERCICIO PROPUESTO 2 – AREA DE UN ROMBO

Public Class Form3

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


procesar.Click

Dim basemen, basemay, altura, area As Double

basemay = txtBaseMayor.Text
basemen = txtBaseMenor.Text
altura = txtAltura.Text

area = ((basemay + basemen) * altura) / 2

txtArea.Text = area

End Sub
End Class
EJERCICIO PROPUESTO 3 – AREA DE UN ROMBO CON DIAGONALES

Public Class Form1

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


procesar.Click

Dim diagmay, diagmen, area As Double

diagmay = txtDiagMayor.Text
diagmen = txtDiagMenor.Text

area = (diagmay * diagmen) / 2

txtArea.Text = area

End Sub
End Class

You might also like