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