Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class MainClass {
- public static void Main (string[] args) {
- Console.Write("Enter the day: ");
- int day = int.Parse(Console.ReadLine());
- Console.Write("Enter the month: ");
- int month = int.Parse(Console.ReadLine());
- Console.Write("Enter the year: ");
- int year = int.Parse(Console.ReadLine());
- DateTime inputtedDate = new DateTime(year, month, day);
- string formattedDate = string.Format("{0:dddd}", inputtedDate);
- Console.WriteLine("This day should be "+ formattedDate);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement