| 1234567891011121314151617181920212223242526272829 |
- using System;
- using System.IO;
- namespace Adv2018
- {
- class Program
- {
- static void Main(string[] args)
- {
- if (args.Length < 1) return;
- var file = File.OpenText(args[0]);
- int frequency = 0;
- do
- {
- var line = file.ReadLine();
- if (line == null) break;
- var freq = int.Parse(line);
- frequency += freq;
- } while (true);
- Console.WriteLine($"Result : {frequency}");
- }
- }
- }
|