Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace P17_PrintPartOfTheASCIITable
- {
- class Program
- {
- static void Main(string[] args)
- {
- char startChar = (char)int.Parse(Console.ReadLine());
- char endChar = (char)int.Parse(Console.ReadLine());
- OutputCharInterval(startChar, endChar);
- }
- static void OutputCharInterval(char startChar, char endChar)
- {
- if (startChar < endChar)
- {
- Console.Write($"{startChar} ");
- OutputCharInterval((char)(startChar + 1), endChar);
- }
- else
- {
- Console.WriteLine($"{startChar}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment