Advertisement
dragonbs

Working Hours

Oct 25th, 2022
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. using System;
  2. namespace _07.Working_Hours
  3. {
  4.     internal class Program
  5.     {
  6.         static void Main(string[] args)
  7.         {
  8.             int fullNum = int.Parse(Console.ReadLine());
  9.             string day = Console.ReadLine();
  10.             if (day == "Monday"|| day == "Tuesday" || day == "Wednesday" || day == "Thursday" || day == "Friday" || day == "Saturday" || day!="Sunday")
  11.             {
  12.                 if (fullNum >= 10 && fullNum <= 18)
  13.                 {
  14.                     Console.WriteLine("open");
  15.                 }
  16.                 else
  17.                 {
  18.                     Console.WriteLine("closed");
  19.                 }
  20.             }
  21.             else
  22.             {
  23.                 Console.WriteLine("closed");
  24.             }
  25.  
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement