TheBulgarianWolf

Random switch statement

Dec 11th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 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 _11._12._2019
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("Enter a profession and you will get the best drink for that profession as an output: ");
  14.             string prof = Console.ReadLine();
  15.             switch (prof)
  16.             {
  17.                 case "Athlete":
  18.                     Console.WriteLine("Water");
  19.                     break;
  20.                 case "Businessman":
  21.                 case "Businesswoman":
  22.                     Console.WriteLine("Coffee");
  23.                     break;
  24.                 case "SoftUni student":
  25.                     Console.WriteLine("Beer");
  26.                     break;
  27.                 default:
Add Comment
Please, Sign In to add comment