Advertisement
AlfaNight

Untitled

Oct 1st, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.20 KB | None | 0 0
  1. using System;
  2. using System.ComponentModel.Design;
  3.  
  4. namespace workingHours
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int hour = int.Parse(Console.ReadLine());
  11.             string day = Console.ReadLine();
  12.  
  13.             if (hour <= 18 && hour >= 10)
  14.             {
  15.                 if (day == "Monday")
  16.                 {
  17.                     Console.WriteLine("open");
  18.                 }
  19.                 if (day == "Tuesday")
  20.                 {
  21.                     Console.WriteLine("open");
  22.                 }
  23.                 if (day == "Wednesday")
  24.                 {
  25.                     Console.WriteLine("open");
  26.                 }
  27.                 if (day == "Thursday")
  28.                 {
  29.                     Console.WriteLine("open");
  30.                 }
  31.                 if (day == "Feiday")
  32.                 {
  33.                     Console.WriteLine("open");
  34.                 }
  35.                 if (day == "Saturday")
  36.                 {
  37.                     Console.WriteLine("open");
  38.                 }
  39.  
  40.             }
  41.             else if (day == "Sunday")
  42.             {
  43.                 Console.WriteLine("closed");
  44.             }
  45.         }
  46.     }
  47. }
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement