Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _3._CharactersInRange
- {
- class CharactersInRange
- {
- static void Main()
- {
- char firstInput = char.Parse(Console.ReadLine());
- char secondInput = char.Parse(Console.ReadLine());
- PrintTheCharsBetweenTwoChars(firstInput, secondInput);
- }
- private static void PrintTheCharsBetweenTwoChars(char firstCharacter, char secondCharacter)
- {
- int startCharacter = Math.Min(firstCharacter, secondCharacter);
- int endCharacter = Math.Max(firstCharacter, secondCharacter);
- for (int i = ++startCharacter; i < endCharacter; i++)
- {
- Console.Write((char)i + " ");
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement