标签:back main ram write ++ get rgs class 输出
class Program { static void Main(string[] args) { getPairs(3, 0, 0, 1, ""); Console.ReadKey(); } private static void getPairs(int close, int left, int right, int inter, string backet) { if (left == close && right == close) { Console.Write(backet + ", "); } if (left < close) { getPairs(close, left + 1, right, inter++, backet + "("); } if (right < left) { getPairs(close, left, right + 1, inter++, backet + ")"); } } }
标签:back main ram write ++ get rgs class 输出
原文地址:http://www.cnblogs.com/haizzh/p/6244703.html