Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,38 @@
using System;
using System.IO;
using System.Linq;
using System.Text;
class Program
{
static char Rot13(char c)
{
if ('a' <= c && c <= 'm' || 'A' <= c && c <= 'M')
{
return (char)(c + 13);
}
if ('n' <= c && c <= 'z' || 'N' <= c && c <= 'Z')
{
return (char)(c - 13);
}
return c;
}
static string Rot13(string s)
{
return new string(s.Select(Rot13).ToArray());
}
static void Main(string[] args)
{
foreach (var file in args.Where(file => File.Exists(file)))
{
Console.WriteLine(Rot13(File.ReadAllText(file)));
}
if (!args.Any())
{
Console.WriteLine(Rot13(Console.In.ReadToEnd()));
}
}
}