diff --git a/2018_07/2018_07.csproj b/2018_07/2018_07.csproj index bd562e3..6ff6161 100644 --- a/2018_07/2018_07.csproj +++ b/2018_07/2018_07.csproj @@ -35,6 +35,8 @@ + + diff --git a/2018_08/2018_08.csproj b/2018_08/2018_08.csproj index ea796f1..4cdb14a 100644 --- a/2018_08/2018_08.csproj +++ b/2018_08/2018_08.csproj @@ -35,6 +35,8 @@ + + diff --git a/2018_08/Program.cs b/2018_08/Program.cs index adb07a9..3c4c577 100644 --- a/2018_08/Program.cs +++ b/2018_08/Program.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; using static System.Console; namespace _2018_08 @@ -12,14 +7,21 @@ namespace _2018_08 { static void Main(string[] args) { - string[] resTab = File.ReadAllText(@"..\..\..\Data\Adventofcode_181208\2018_08_data.txt").Split(' '); + //string[] resTab = File.ReadAllText(@"..\..\..\Data\Adventofcode_181208\2018_08_data.txt").Split(' '); //string[] resTab = @"2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2 2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2".Split(' '); + string[] resTab = @"2 3 2 1 2 3 1 1 0 2 1 2 3 0 3 4 5 6 7 8 9 0 4 10 11 12 13 14 2 2 0 3 15 16 17 0 2 18 19 20 21 22 23 24".Split(' '); int[] numbers = new int[resTab.Length]; for (int i = 0; i < resTab.Length; i++) { numbers[i] = int.Parse(resTab[i]); } - WriteLine($"Antal värden = {resTab.Length}"); + int y = 0; + for(int z = 1; z < 25; z++) + { + y += z; + } + + WriteLine($"Antal värden = {resTab.Length} svar = {y}"); ReadKey(); var pgm = new Program();