Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class MainClass {
- public static void Main (string[] args) {
- DateTime todayDate = DateTime.Now;
- string formattedDay = string.Format("{0:dddd}", todayDate);
- switch (formattedDay)
- {
- case "Saturday": Console.WriteLine("Yellow"); break;
- case "Sunday": Console.WriteLine("Green"); break;
- case "Friday": Console.WriteLine("Blue"); break;
- case "Thursday": Console.WriteLine("Grey"); break;
- case "Tuesday": Console.WriteLine("Red"); break;
- case "Wednesday": Console.WriteLine("Orange"); break;
- case "Monday" : Console.WriteLine("White"); break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement