SHARE
TWEET

Untitled

a guest Oct 18th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace charactersInRange
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             char startSign = char.Parse(Console.ReadLine());
  10.             char endSign = char.Parse(Console.ReadLine());
  11.             PrintSignBetween(startSign, endSign);
  12.         }
  13.  
  14.         static void PrintSignBetween(char startSign, char endSign)
  15.         {
  16.             if(startSign < endSign)
  17.             {
  18.                 for (int i = startSign + 1; i < endSign; i++)
  19.                 {
  20.                     Console.Write((char)i + " ");
  21.                 }
  22.             }
  23.             else
  24.             {
  25.                 for (int i = endSign + 1; i < startSign; i++)
  26.                 {
  27.                     Console.Write((char)i + " ");
  28.                 }
  29.             }
  30.         }
  31.     }
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top