Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- namespace _03._Characters_in_Range
- {
- public class Program
- {
- public static void Main()
- {
- char firstCharacter = char.Parse(Console.ReadLine());
- char secondCharacter = char.Parse(Console.ReadLine());
- Console.WriteLine(Between(firstCharacter, secondCharacter));
- }
- public static string Between(char firstCharacter, char secondCharacter)
- {
- string currentChar = string.Empty;
- int one = (int) firstCharacter;
- int second = (int) secondCharacter;
- for (int i = one + 1; i < second; i++)
- {
- firstCharacter = Convert.ToChar(i);
- currentChar += firstCharacter + " ";
- }
- return currentChar;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement