Created
July 19, 2013 03:17
-
-
Save DapperFox/6034855 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Console.WriteLine("Enter the first day of the week (day, month, year) eg(24, 02, 2013)"); | |
| string userInput = Console.ReadLine(); | |
| if (dateArray[0] < 1 && dateArray[0] > 31 || dateArray[1] < 1 && dateArray[1] > 12 || dateArray[2] < 1000 && dateArray[2] > 2013) | |
| { | |
| Console.WriteLine("Incorrect form for a date. Please try again."); | |
| InputHours(); | |
| } | |
| string[] splitDate = userInput.Split(','); | |
| for (int i = 0; i < splitDate.Length; i++) | |
| { | |
| dateArray[i] = Convert.ToInt32(splitDate[i]); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment