Skip to content

Commit

Permalink
Ciclo do while en Visual Basic.NET [33]⛓️
Browse files Browse the repository at this point in the history
  • Loading branch information
programadornovato committed Jul 12, 2021
1 parent ca02cb2 commit b8b57dc
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions VisualBasic/Program.vb
Expand Up @@ -6,26 +6,24 @@ Imports System
Module Program
'Este codigo escribe un texto en amarillo con fondo azul
Public Sub Main(args As String())
Dim rand = New Random()
Dim d1 = rand.Next(1, 7)
Dim d2 = rand.Next(1, 7)
Dim d3 = rand.Next(1, 7)
Console.WriteLine("d1=" & d1)
Console.WriteLine("d2=" & d2)
Console.WriteLine("d3=" & d3)
If d1 = 6 And d2 = 6 And d3 = 6 Then
Console.WriteLine("Excelnte")
Else
If (d1 = 6 And d2 = 6) Or (d1 = 6 And d3 = 6) Or (d2 = 6 And d3 = 6) Then
Console.WriteLine("Muy bien")
Else
If d1 = 6 Or d2 = 6 Or d3 = 6 Then
Console.WriteLine("Regular")
Else
Console.WriteLine("Pesimo")
End If
End If
End If

'Dim i = 1
'While i <= 10
' Console.WriteLine("i=" & i)
' i = i + 1
'End While
'Dim i = 10
'While i >= 1
' Console.WriteLine("i=" & i)
' i = i - 1
'End While
Console.WriteLine("Humano por favor ingresa un numero de veces a repetir")
Dim repetir = Integer.Parse(Console.ReadLine())
Dim i = 1
While i <= repetir
Console.WriteLine("i=" & i)
i = i + 1
End While
Console.Read()
End Sub
End Module

0 comments on commit b8b57dc

Please sign in to comment.