Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DayOfWeek
- {
- class Program
- {
- static void Main(string[] args)
- {
- int numDay = int.Parse(Console.ReadLine());
- Console.WriteLine(numDay > 7 || numDay < 1 ? "error"
- : DateTime.ParseExact($"{numDay}/08/2016", "d/MM/yyyy", CultureInfo.InvariantCulture).DayOfWeek.ToString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement