static void Main(string[] args) { string fi = "i3.txt", fo = "o.txt"; if (args.Length > 0) { fi = args[0]; } if (args.Length > 1) { fo = args[1]; } StreamReader sr = new StreamReader(fi); StreamWriter sw = new StreamWriter(fo); string line = sr.ReadLine(); int n = Convert.ToInt32(line); Milkshakes o = new Milkshakes(); for (int i = 0; i < n; i++) { sw.Write("Case #"); sw.Write(i + 1); sw.Write(":"); o.gen(sw, sr); } sr.Close(); sw.Close(); }
static void M2Old() { string sLines = Console.ReadLine(); bool bManual = sLines.StartsWith("m"); if (bManual) { sLines = sLines.Substring(1); } int N = int.Parse(sLines); for (int i = 0; i < N; i++) { Milkshakes o = new Milkshakes(); string s = Console.ReadLine(); int F = int.Parse(s); int C = int.Parse(Console.ReadLine()); string[] cust = new string[C]; for (int j = 0; j < C; j++) { cust[j] = Console.ReadLine(); } string sOut = o.Process(F, cust); Console.WriteLine("Case #{0}: {1}", i + 1, sOut); //string[] sOut = o.ProcessMulti(roads,city); //Console.WriteLine("Case #{0}:", i + 1); //for (int j = 0; j < sOut.Length; j++) { // Console.WriteLine(sOut[j]); //} } if (bManual) { Console.ReadKey(); } }