JOIN DEVPPL

It looks like you are new here. If you want to get involved, click on Join below!



Magic Dates - please help


D

keyboard_arrow_up
0
keyboard_arrow_down


First Post Mark as Spam Dryden Dan
Posts: 1 - Registered: 2016-08-28 22:46:11

"The date June 10, 1960, is special because when it is written in the following format, the month times the day equals the year:

6/10/60

Design a program that asks the user to enter a month (in numeric form), a day, and a two-digit year. The program should then determine whether the month times the day equals the year. If so, it should display a message saying the date is magic. Otherwise, it should display a message saying the date is not magic."

Here is what I got so far

Sub Main()
Dim month As Integer = 0
Dim day As Integer = 0
Dim year As Integer = 0
Dim magic As Integer = 0

Console.WriteLine("Enter a month (MM): ")
month = Console.ReadLine()
Console.WriteLine("Enter a day (DD): ")
day = Console.ReadLine()
Console.WriteLine("Enter a year (YY): ")
year = Console.ReadLine()

magic = day * month

If magic = year Then
year = "Magic"
Else
year = "Not Magic"
End If

Console.WriteLine("Please select enter to continue...")
Console.ReadLine()

End Sub






JOIN DEVPPL

It looks like you are new here. If you want to get involved, click on Join below!




MENU
Advertising