Descargar

Lógica para Computación (página 2)


Partes: 1, 2

Dim AT As Decimal

Dim ACI As Decimal

Dim OTRO As String

Do

Console.WriteLine("ELIJA OPCION: ")

Console.WriteLine("OPCION 1: AREA CUADRADO ")

Console.WriteLine("OPCION 2: AREA TRIANGULO ")

Console.WriteLine("OPCION 3: AREA CIRCULO ")

OPCION = Console.ReadLine()

If OPCION = 1 Then

Do

Console.WriteLine(" DIGITE MEDIDA DEL LADO ")

L = Console.ReadLine()

If L > 0 Then

AC = L ^ 2

Console.WriteLine("AREA CUADRADO: " & AC)

Else

Console.WriteLine("ERROR REQUIERE VALOR MAYOR

A 0")

End If

Loop Until L > 0

End If

If OPCION = 2 Then

Do

Console.WriteLine(" DIGITE MEDIDA DE BASE ")

B = Console.ReadLine()

If B 0

Do

Console.WriteLine(" DIGITE MEDIDA DE ALTURA ")

H = Console.ReadLine()

If H 0

AT = B * H / 2

Console.WriteLine("AREA TRIANGULO: " & AT)

End If

If OPCION = 3 Then

Do

Console.WriteLine(" DIGITE MEDIDA DEL RADIO ")

R = Console.ReadLine()

If R > 0 Then

ACI = 3.14 * R ^ 2

Console.WriteLine("AREA CIRCULO: " & ACI)

Else

Console.WriteLine("ERROR REQUIERE VALOR MAYOR

A 0")

End If

Loop Until R > 0

End If

If OPCION > 3 Then

Console.WriteLine("ERROR ! RANGO DE OPCIONES ES DEL

1 AL 3")

End If

Console.WriteLine("DESEA OTRO CALCULO?")

OTRO = Console.ReadLine()

Loop Until OTRO "SI"

End Sub

End Module

 

 

 

Autor:

Josué Raúl Álvarez Vargas

FECHA: Octubre, 2010

Partes: 1, 2
 Página anterior Volver al principio del trabajoPágina siguiente