Академический Документы
Профессиональный Документы
Культура Документы
EJERCICIO 1
Dim a As Long
Dim x As Integer
WriteLine("escriba su decimal que desee: ")
a = ReadLine()
WriteLine("escriba el decimal que desee redondear: ")
x = ReadLine()
a = Math.Round(a, x)
WriteLine("su resultado es: " & a)
ReadLine()
Main()
End Sub
End Module
EJERCICIO 2
Sub Main()
Console.Title = "VELOCIDAD MAXIMA DE AUTOMOVILES "
Dim vel As Integer
Console.WriteLine("ingrese la velocidad maxima de su automovil: ")
vel = Console.ReadLine()
Select Case vel
Case 0 To 15
Console.WriteLine("la velocidad a la que va el automovil es:
LENTO")
Case 16 To 50
Console.WriteLine("la velocidad a la que va el automovil es:
RAPIDO")
Case 51 To 10000
Console.WriteLine("la velocidad a la que va el automovil es:
VELOZ")
Case Else
Console.WriteLine("ERROR, ingrese velocidades (km/h) positivas")
End Select
Console.ReadLine()
Main()
End Sub
End Module
EJERCICIO 3
WriteLine(msm)
ReadLine()
Main()
End Sub
End Module
EJERCICIO 4
Tabla de multiplicar
Imports System.Console
Module Module1
Sub Main()
Dim n1 As Integer
WriteLine("escribe el numero del cual deseas la multiplicacion: ")
n1 = ReadLine()
For i As Integer = 1 To 10
WriteLine(n1.ToString + " x " + i.ToString + "=" + CStr(n1 * i))
Next
ReadLine()
Main()
End Sub
End Module
EJERCICIO 5
Triangulo de letras
Imports System.Console
Module Module1
Sub Main()
Dim s As String
Next
WriteLine(s)
Next
ReadLine()
End Sub
End Module
EJERCICIO 6
Triangulo de asteriscos
Imports System.Console
Module Module1
Sub Main()
Dim x As Integer
x = 9
For y = 1 To 9
For i = 1 To x
Write("*")
Next
WriteLine()
x = x - 1
Next
ReadLine()
End Sub
End Module
EJERCICIO 7
Días de la semana
Module Module1
Sub Main()
End Select
Console.ReadLine()
End Sub
End Module
EJERCICIO 8
Identificar el número mayor
Module Module1
Sub Main()
Dim a, b, c As Integer
Console.WriteLine("escribe el primer numero: ")
a = Console.ReadLine()
Console.WriteLine("escribe el segundo numero: ")
b = Console.ReadLine()
Console.WriteLine("escribe el tercer numero: ")
c = Console.ReadLine()
End If
End If
End If
End If
Console.ReadLine()
Main()
End Sub
End Module
EJERCICIO 9
Sub Main()
Dim r As Integer = 0
Console.WriteLine("TABLA DE SUMAR DEL 10")
For s1 = 1 To 10
For s2 = s1 To 10
r = s1 + s2
Console.WriteLine("" & s1 & " + " & s2 & " = " & r)
Next
Next
Console.ReadLine()
End Sub
End Module
EJERCICIO 10
Identifica los números primos
Module Module1
Sub Main()
Dim n1 As Integer
Dim respuesta As Boolean = True
Next
If respuesta = False Then
Console.WriteLine("el numero no es primo ")
Else
Console.WriteLine("el numero es primo")
End If
Console.ReadLine()
End Sub
End Module