Advertisement
Nikolay_Kashev

Day of Week

May 27th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. using System;
  2. using System.Globalization;
  3.  
  4. namespace Day_of_Week
  5. {
  6.     class DayOfWeek
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             string dateAsText = Console.ReadLine();
  11.             DateTime date = DateTime.ParseExact(dateAsText, "d-M-yyyy", CultureInfo.InvariantCulture);
  12.             Console.WriteLine(date.DayOfWeek);
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement