kirililchev3

Choose a drink - if else

May 19th, 2018
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Exercise2
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string proffession = Console.ReadLine();
  10.  
  11.             if (proffession == "Athlete")
  12.             {
  13.                 Console.WriteLine("Water");
  14.             } else if (proffession == "Businessman" || proffession == "Businesswoman")
  15.             {
  16.                 Console.WriteLine("Coffee");
  17.             } else if (proffession == "SoftUni Student")
  18.             {
  19.                 Console.WriteLine("Beer");
  20.             } else
  21.             {
  22.                 Console.WriteLine("Tea");
  23.             }
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment