Ronka

Untitled

Jun 8th, 2017
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace daysofweek
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string[] day = { "Monday",
  14. "Tuesday",
  15. "Wednesday",
  16. "Thursday",
  17. "Friday",
  18. "Saturday",
  19. "Sunday" };
  20.  
  21. int n = int.Parse(Console.ReadLine());
  22.  
  23. if (n >= 1 && n <= 7)
  24. Console.WriteLine(day[n-1]);
  25. else
  26. Console.WriteLine("Invalid Day!");
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment