Advertisement
OwlyOwl

domashka123

Jun 29th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  1. using System;
  2. using System.Net.Http.Headers;
  3.  
  4. namespace testing
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             bool isUp = true;
  11.             while (isUp)
  12.             {
  13.                 Console.WriteLine("Type 1 or 2 or 3, 4 for exit");
  14.                 int userInput = Convert.ToInt32(Console.ReadLine());
  15.                 switch (userInput)
  16.                 {
  17.                     case 1:
  18.                         Console.WriteLine("one is one");
  19.                         break;
  20.                     case 2:
  21.                         Console.WriteLine("two is two");
  22.                         break;
  23.                     case 3:
  24.                         Console.WriteLine("three is three");
  25.                         break;
  26.                     case 4:
  27.                         Console.WriteLine("Bye, see you next time!");
  28.                         isUp = false;
  29.                         break;
  30.                 }
  31.             }
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement