Ascii
unknown
csharp
2 years ago
696 B
3
Indexable
Never
static void Main(string[] args) { Console.WriteLine("Herfi daxil edin."); byte[] characters = Encoding.ASCII.GetBytes(Console.ReadLine()); Console.WriteLine(); byte[] previous = { Convert.ToByte(characters[0] - 1) }; char[] previousCharacter = Encoding.ASCII.GetChars(previous); Console.WriteLine($"Evvelki simvol: {previousCharacter[0]}"); byte[] next = { Convert.ToByte(characters[0] + 1) }; char[] nextCharacter = Encoding.ASCII.GetChars(next); Console.WriteLine($"Sonrakı simvol: {nextCharacter[0]}"); Console.ReadLine(); }