kzborisov

Untitled

Oct 28th, 2018
1,325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 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 summer_outfit
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int degrees = int.Parse(Console.ReadLine());
  14. string time = Console.ReadLine();
  15.  
  16. string outfit = "";
  17. string shoes = "";
  18.  
  19.  
  20. switch (time)
  21. {
  22. case "Morning":
  23. if (degrees >= 10 && degrees <= 18)
  24. {
  25. outfit = "Sweatshirt";
  26. shoes = "Sneakers";
  27.  
  28. }
  29. else if (degrees > 18 && degrees <= 24)
  30. {
  31. outfit = "Shirt";
  32. shoes = "Moccasins";
  33. }
  34. else if (degrees >= 25)
  35. {
  36. outfit = "T-Shirt";
  37. shoes = "Sandals";
  38. }
  39. //Console.WriteLine($"It's {degrees} degrees, get your {outfit} and {shoes}.");
  40. break;
  41. case "Afternoon":
  42. if (degrees >= 10 && degrees <= 18)
  43. {
  44. outfit = "Shirt";
  45. shoes = "Moccasins";
  46.  
  47. }
  48. else if (degrees > 18 && degrees <= 24)
  49. {
  50. outfit = "T-Shirt";
  51. shoes = "Sandals";
  52. }
  53. else if (degrees >= 25)
  54. {
  55. outfit = "Swim Suit";
  56. shoes = "Barefoot";
  57. }
  58. //Console.WriteLine($"It's {degrees} degrees, get your {outfit} and {shoes}.");
  59. break;
  60. case "Evening":
  61. outfit = "Shirt";
  62. shoes = "Moccasins";
  63. //Console.WriteLine($"It's {degrees} degrees, get your {outfit} and {shoes}.");
  64. break;
  65. }
  66.  
  67. Console.WriteLine($"It's {degrees} degrees, get your {outfit} and {shoes}.");
  68. }
  69. }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment