Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CharactersInRange
- {
- class Program
- {
- static void Main(string[] args)
- {
- char firstChar = char.Parse(Console.ReadLine());
- char secondChar = char.Parse(Console.ReadLine());
- char temp;
- if (secondChar < firstChar)
- {
- temp = firstChar;
- firstChar = secondChar;
- secondChar = temp;
- }
- PrintCharactersInRange(firstChar, secondChar);
- }
- static void PrintCharactersInRange(char firstChar, char secondChar)
- {
- for (int i = firstChar + 1; i < secondChar; i++)
- {
- Console.Write((char)i + " ");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment