Module ZodiacSignChecker
    Sub Main()
        ' Prompt user to input month and day of birth
        Console.WriteLine("Enter your birth month (as a number):")
        Dim month As Integer = Integer.Parse(Console.ReadLine())

        Console.WriteLine("Enter your birth day:")
        Dim day As Integer = Integer.Parse(Console.ReadLine()) ' <- Corrected line

        ' Check zodiac sign based on input
        Dim zodiacSign As String = GetZodiacSign(month, day)

        ' Output the result
        Console.WriteLine("Your Zodiac sign is: " & zodiacSign)

        ' Wait for user to close the console window
        Console.ReadLine()
    End Sub

    Function GetZodiacSign(month As Integer, day As Integer) As String
        ' Define the date ranges for each zodiac sign
        If (month = 3 AndAlso day >= 21) OrElse (month = 4 AndAlso day <= 19) Then
            Return "Aries"
        ElseIf (month = 4 AndAlso day >= 20) OrElse (month = 5 AndAlso day <= 20) Then
            Return "Taurus"
        ElseIf (month = 5 AndAlso day >= 21) OrElse (month = 6 AndAlso day <= 20) Then
            Return "Gemini"
        ElseIf (month = 6 AndAlso day >= 21) OrElse (month = 7 AndAlso day <= 22) Then
            Return "Cancer"
        ElseIf (month = 7 AndAlso day >= 23) OrElse (month = 8 AndAlso day <= 22) Then
            Return "Leo"
        ElseIf (month = 8 AndAlso day >= 23) OrElse (month = 9 AndAlso day <= 22) Then
            Return "Virgo"
        ElseIf (month = 9 AndAlso day >= 23) OrElse (month = 10 AndAlso day <= 22) Then
            Return "Libra"
        ElseIf (month = 10 AndAlso day >= 23) OrElse (month = 11 AndAlso day <= 21) Then
            Return "Scorpio"
        ElseIf (month = 11 AndAlso day >= 22) OrElse (month = 12 AndAlso day <= 21) Then
            Return "Sagittarius"
        ElseIf (month = 12 AndAlso day >= 22) OrElse (month = 1 AndAlso day <= 19) Then
            Return "Capricorn"
        ElseIf (month = 1 AndAlso day >= 20) OrElse (month = 2 AndAlso day <= 18) Then
            Return "Aquarius"
        ElseIf (month = 2 AndAlso day >= 19) OrElse (month = 3 AndAlso day <= 20) Then
            Return "Pisces"
        Else
            Return "Invalid date"
        End If
    End Function
End Module

 
by