• Lenguaje

    Visual Basic .Net

  • Descripción

    Pide el número del mes y muestra su nombre.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Module NombreDelMes

    Sub Main()
        Dim mes As Integer
        Console.Write("Ingresa el valor de mes: ")
        mes = Integer.Parse(Console.ReadLine())
        If mes = 1 Then
            Console.WriteLine("Enero")
        End If
        If mes = 2 Then
            Console.WriteLine("Febrero")
        End If
        If mes = 3 Then
            Console.WriteLine("Marzo")
        End If
        If mes = 4 Then
            Console.WriteLine("Abril")
        End If
        If mes = 5 Then
            Console.WriteLine("Mayo")
        End If
        If mes = 6 Then
            Console.WriteLine("Junio")
        End If
        If mes = 7 Then
            Console.WriteLine("Julio")
        End If
        If mes = 8 Then
            Console.WriteLine("Agosto")
        End If
        If mes = 9 Then
            Console.WriteLine("Septiembre")
        End If
        If mes = 10 Then
            Console.WriteLine("Octubre")
        End If
        If mes = 11 Then
            Console.WriteLine("Noviembre")
        End If
        If mes = 12 Then
            Console.WriteLine("Diciembre")
        End If
        Console.WriteLine()
        Shell ("cmd /c pause", AppWinStyle.NormalFocus, True)
    End Sub

End Module