Comment on Show HN: an extremely simple program shows a 2D structure in the integersComments−rjbwork12yFor any lazy C# folks: internal class Program { public static void Main() { int numRows = 256; int numColumns = 128; for (int row = 0; row < numRows; row++) { StringBuilder rowOutput = new StringBuilder(); for (int column = 0; column < numColumns; column++) { if ((row & column) != 0) rowOutput.Append("1"); else rowOutput.Append("0"); } Console.WriteLine("row/col {0}:\t{1}", row, rowOutput); } Console.Read(); } } Cool stuff, very interesting to see that triangle structure emerge.−parkovski12yFor the even lazier: http://dotnetfiddle.net/gsdfJp
Comments
For any lazy C# folks:
Cool stuff, very interesting to see that triangle structure emerge.For the even lazier: http://dotnetfiddle.net/gsdfJp