0
C# How to make a New Driver's License Code Coach For Loop work?
In the attached code is a section that says 'Failure for unknown reason.' When ran it passes 4 of the 5 tests for the Code Coach Challenge but I do not know why it is failing the 5th test. Why does it fail the scenario/ could it be solved with just the 1 for loop? I ended up giving up and going with if statements instead in my 'Working Solution' but I would like to get the loop to work instead. The program explains the scenario it is solving. https://code.sololearn.com/c1WiXtn65p30/?ref=app
1 Answer
0
I've created a list:
List<string> drivers = new List<string>(Console.ReadLine().Split(' '));
Then used List.Add() and Sort() methods without if statements and for loops.