nikolapetkov824

CharactersInRange

Oct 17th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CharactersInRange
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             char top = char.Parse(Console.ReadLine());
  10.             char bottom = char.Parse(Console.ReadLine());
  11.  
  12.             CharactersInBetween(top,bottom);
  13.             Console.WriteLine();
  14.            
  15.         }
  16.  
  17.         public static void CharactersInBetween(char first, char second)
  18.         {
  19.             for (int i = first + 1; i < second; i++)
  20.             {
  21.                 Console.Write((char)i + " ");
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment