From 0c8129d63cf149c7bd8913e20da5cd3af10eb0f9 Mon Sep 17 00:00:00 2001 From: Adam Boyes <16BoyesA@fulford.york.sch.uk> Date: Mon, 10 Jan 2022 13:31:48 +0000 Subject: [PATCH 1/3] All issues resolved --- ListChallenge/Program.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ListChallenge/Program.cs b/ListChallenge/Program.cs index 8bafd1c..4a160eb 100644 --- a/ListChallenge/Program.cs +++ b/ListChallenge/Program.cs @@ -10,10 +10,16 @@ class Program { static void Main(string[] args) { - List names = new List { "Will 1", "Will 2", "Ethan"}; - names.Add("Tom"); - - Console.WriteLine(names[3]); + Random rnd = new Random(); + + List names = new List { "Will 1", "Will 2", "Ethan", "Adam", "Cormac", "Tom", "Ben", "Henry", "Mr. Dring", "Ashton", "Ethan"}; + List score = new List { }; + for (int i = 0; i < names.Count(); i++) + { + score.Add(rnd.Next(100)); + Console.WriteLine(names[i] +" "+score[i]); + } + Console.ReadLine(); } } } From f2ec4597e0a559179cdb3863983069b4a50bade5 Mon Sep 17 00:00:00 2001 From: Adam Boyes <16BoyesA@fulford.york.sch.uk> Date: Mon, 10 Jan 2022 13:34:08 +0000 Subject: [PATCH 2/3] Close #1, Close #2, Close #3 --- ListChallenge/Program.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ListChallenge/Program.cs b/ListChallenge/Program.cs index 4a160eb..c40922b 100644 --- a/ListChallenge/Program.cs +++ b/ListChallenge/Program.cs @@ -6,20 +6,28 @@ namespace ListChallenge { + class Program { + static void Main(string[] args) { + Random rnd = new Random(); List names = new List { "Will 1", "Will 2", "Ethan", "Adam", "Cormac", "Tom", "Ben", "Henry", "Mr. Dring", "Ashton", "Ethan"}; List score = new List { }; + for (int i = 0; i < names.Count(); i++) { + score.Add(rnd.Next(100)); Console.WriteLine(names[i] +" "+score[i]); + } + Console.ReadLine(); + } } } From 7767d34214f61d457ab944e8cb12a3859fc9c9ca Mon Sep 17 00:00:00 2001 From: 16boyesa <97159855+16boyesa@users.noreply.github.com> Date: Mon, 10 Jan 2022 13:35:46 +0000 Subject: [PATCH 3/3] Create README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e861e0d --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +## ListChallenge +##### All issues resolved, code working