Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace daysofweek
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] day = { "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday" };
- int n = int.Parse(Console.ReadLine());
- if (n >= 1 && n <= 7)
- Console.WriteLine(day[n-1]);
- else
- Console.WriteLine("Invalid Day!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment