Advertisement
Guest User

Untitled

a guest
Apr 4th, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.31 KB | None | 0 0
  1. using System;
  2.  
  3. namespace SummerOutfit
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int gradus = int.Parse(Console.ReadLine());
  10.             string time = Console.ReadLine();
  11.             string outfit = "";
  12.             string shoes = "";
  13.  
  14.             switch (time)
  15.             {
  16.                 case "Morning":
  17.                     if (gradus <= 18)
  18.                     { outfit = "Sweatshirt"; shoes = "Sneakers"; }
  19.                     else if (gradus <= 24)
  20.                     { outfit = "Shirt"; shoes = "Moccasins"; }
  21.                     else
  22.                     { outfit = "T-Shirt"; shoes = "Sandals"; }
  23.                     break;
  24.                 case "Afternoon":
  25.                     if (gradus <= 18)
  26.                     { outfit = "Shirt"; shoes = "Moccasins"; }
  27.                     else if (gradus <= 24)
  28.                     { outfit = "T-Shirt"; shoes = "Sandals"; }
  29.                     else
  30.                     { outfit = "Swim Suit"; shoes = "Barefoot"; }
  31.                     break;
  32.                 case "Evening":
  33.                     outfit = "Shirt";
  34.                     shoes = "Moccasins";
  35.                     break;
  36.             }
  37.             Console.WriteLine($"It's {gradus} degrees, get your {outfit} and {shoes}.");
  38.  
  39.  
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement