TheBulgarianWolf

Characters in Range

Oct 30th, 2020
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using System;
  2. using System.Threading;
  3.  
  4. namespace ConsoleApp1
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             Console.Write("Enter the first character here: ");
  11.             string first = Console.ReadLine();
  12.             char char1 = first[0];
  13.             Console.Write("Enter the second character here: ");
  14.             string second = Console.ReadLine();
  15.             char char2 = second[0];
  16.             for(int i = char1; i < char2; i++)
  17.             {
  18.                 Console.Write((char)i + " ");
  19.             }
  20.         }
  21.     }
  22. }
  23.  
Add Comment
Please, Sign In to add comment