コード例 #1
0
ファイル: realFake.cs プロジェクト: miller-a61/Practice
    static void Main(string[] args)
    {
        //using (StreamReader sr = new StreamReader("test_file.txt"))
        using (StreamReader sr = File.OpenText(args[0]))
        {
            string  line;
            program a = new program();

            while ((line = sr.ReadLine()) != null)
            {
                Console.WriteLine(a.findAnswer(line));
            }
        }
        Console.Read();
    }
コード例 #2
0
    static void Main(string[] args)
    {
        //using (StreamReader sr = new StreamReader("test_file.txt"))
        using (StreamReader sr = File.OpenText(args[0]))
        {
            string  line;
            int     output;
            program a = new program();

            while ((line = sr.ReadLine()) != null)
            {
                line = line.Trim();

                if (line.Length > 0)
                {
                    output = a.findAnswer(line);

                    Console.WriteLine(output);
                }
            }
        }
        Console.Read();
    }