You are viewing a single comment's thread. Return to all comments →
**** C# public static List BreakRecords(List scores) { List recordcounts = new List() { 0, 0 };
int highestInd = 0; int lowestInd = 1; int lowestRecord = scores[0]; int highestRecord = scores[0]; foreach (int record in scores) { if (record < lowestRecord) { recordcounts[lowestInd]++; lowestRecord = record; } else if (record > highestRecord) { recordcounts[highestInd]++; highestRecord = record; } } return recordcounts;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Breaking the Records
You are viewing a single comment's thread. Return to all comments →
**** C# public static List BreakRecords(List scores) { List recordcounts = new List() { 0, 0 };
}