using System; using System.IO; /* Update each run for the number of examples in each chapter */ class generate_program_examples { static int Main() { const int n = 13 ; string base_name = "c15"; string file_type = ".cs"; string input_file_name = "c15_examples.txt"; StreamReader input_file = File.OpenText(input_file_name); string output_file_name ; StreamWriter output_file ; string line; for (int i=0;i 0 ) { if ( line.Substring(0,1) == "}" ) { output_file.WriteLine(line); output_file.Close(); break; } } output_file.WriteLine(line); } } return (0); } }