Escolar Documentos
Profissional Documentos
Cultura Documentos
Sub Main()
Dim op As Integer
Console.Clear()
Console.WriteLine(" TALLER CONDICIONALES ")
Console.WriteLine(" 1. Ejercicio N 1 ")
Console.WriteLine(" 2. Ejercicio N 2 ")
Console.WriteLine(" 3. Ejercicio N 3 ")
Console.WriteLine(" 4. Ejercicio N 4 ")
Console.WriteLine(" 5. Ejercicio N 5 ")
Console.WriteLine(" 6. Ejercicio N 6 ")
Console.WriteLine(" 7. Ejercicio N 7 ")
Console.WriteLine(" 8. Salir ")
Console.WriteLine(" seleccione una opcion entre 1 y 8 ")
op = Console.ReadLine
Select Case op
Case 1
Dim c, po, pdp, rta As Integer
Dim a As String
Console.WriteLine(" Ingrese el nombre del articulo ")
a = Console.ReadLine
Console.WriteLine(" Ingrese precio del articulo ")
po = Console.ReadLine
Console.WriteLine(" Ingrese la clave, no se le olvide que solamente puede ser
1 o 2 ")
c = Console.ReadLine
If c = 1 Then
rta = po * 0.1
pdp = po - rta
Else
If c = 2 Then
rta = po * 0.2
pdp = po - rta
Else
Console.WriteLine(" LA CLAVE ES ERRONEA ")
End If
End If
Console.WriteLine(" El articulo es : " & a)
Console.WriteLine(" El valor sin descuento es : " & po)
Console.WriteLine(" El valor con descuento es : " & pdp)
Console.ReadLine()
Main()
Case 2
Dim num, a, b, c, d As Integer
Console.WriteLine(" Ingrese el numero de camisas ")
num = Console.ReadLine
Console.WriteLine(" Ingrese el precio de las camisas ")
a = Console.ReadLine
b = num * a
If num < 3 Then
c = (b * 0.1)
d=b-c
Else
If num >= 3 Then
c = (b * 0.2)
d=b-c
End If
End If
Num2)
Num1)
Num1)
Num2)
Case 5
End Select
End Sub
End Module
_________________________________________________________________________________
Module Module1
Sub main()
Dim a, b, c, d, def, deft As Double
Console.WriteLine("Ingrese la primera calificacion ")
a = Console.ReadLine
Console.WriteLine("Ingrese la segunda calificacion ")
b = Console.ReadLine
Console.WriteLine("Ingrese la tercera calificacion ")
c = Console.ReadLine
Console.WriteLine("Ingrese la cuarta calificacion ")
d = Console.ReadLine
def = (a + b + c + d)
deft = def / 4
End Module