LoginSignup
1
1

More than 3 years have passed since last update.

ソースと出力が同じC#プログラム

Last updated at Posted at 2020-03-31

初めに

エイプリルフールだけどネタを準備していなかったので 10年前にやったネタの再掲。

ソースと出力が同じ C#プログラム

FixedPoint.cs
using System;

namespace FixedPoint
{
    class Program
    {
        static void Main(string[] args)
        {
            string strX = @"using System;

namespace FixedPoint
{
    class Program
    {
        static void Main(string[] args)
        {
            string strX = @""[X]"";
            Console.Write(strX.Replace(""["" + ""X"" + ""]"", strX.Replace(@"""""""",@"""""""""""")));
        }
    }
}
";
            Console.Write(strX.Replace("[" + "X" + "]", strX.Replace(@"""",@"""""")));
        }
    }
}

解説っぽくない解説

このプログラムは再帰定理(再帰関数は再帰を使わない形で記述できる)の証明を参考にして作ったと記憶している。

発表元

「NaruTo の 御家」-「計算機譜表工房」-「ソースと出力が同じプログラム at C#」

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1