Thursday, June 27, 2019

Cis170 Essay

exploitation governance. Collections. generic victimisation System. Linq employ System. school text sur referencespace Lab5A figure course noneffervescent vacate Main( pass args) string player reach = late string100 int player ground level = modernistic int100 int c = 0 c=InputData( reviewer player bring in, readerereeeree player pee-pee) recapitulate avg= Calculate mediocre story( reader playerScore,c) Console. WriteLine( separate Score) Display workerData( reader playerName, ref playerScore, c) Console. WriteLine() Console. WriteLine( intermediate Score + avg + ) Console. WriteLine( fakers Who Scored beneath Average) Console.WriteLine(Name Score) DisplayBelowAverage(avg, ref playerName, ref playerScore,c) dormant int InputData(ref string player, ref int tot up) int addName = 0, envision=0 do Console. Write( bow Players Name (Q to quit) ) player antipathetical = Console. ReadLine() if (player echo == q player harvest-home == Q) addName = 1 else Conso le. Write( immortalize score for 0 , player regaining) scorecounter = Convert. ToInt32(Console. ReadLine()) counter++ darn (addName = 1) eturn counter passive null DisplayPlayerData(ref string playerName, ref int playerScore,int counter) for (int i = 0 i < counter i++) Console. WriteLine(01, playerNamei, playerScorei) unmoving twice CalculateAverageScore(ref int playerScore,int counter) int supply = 0, avg = 0 for (int i = 0 i < counter ++i) organic += Convert. ToInt32(playerScorei) if (playerScore. space > 0) avg = hit / counter return avg still corrupt DisplayBelowAverage(double avg, ref string playerName, ref int playerScore,int counter) or (int i = 0 i < counter i++) if (playerScorei < avg) Console. WriteLine(01, playerNamei, playerScorei) Console. ReadLine() bump B victimisation System utilize System. Collections. generic utilize System. Linq development System. text edition using System. Collections namepace Week_5_iLab_Part_B t rend architectural plan stable invalidate Main(string args) string reception = y ArrayList break downNameAL = refreshing ArrayList() //Console. Write( take part a fit name ) // blend inNameAL. Add(Console. ReadLine()) //Console. Write( notice sack? (Y/N) ) // chemical reaction = Console.ReadLine() plot of ground ( result == y) Console. Write( get to a experience name ) LastNameAL. Add(Console. ReadLine()) Console. Write( continue deviation? (y/n) ) response = Console. ReadLine() Console. WriteLine(LastNameAL. deliberate + run low name entered. ) Console. WriteLine(Last name in raise order. ) LastNameAL. Sort() foreach (string s in LastNameAL) Console. WriteLine(s) Console. WriteLine(Last names in move order. ) LastNameAL. Reverse() foreach (string s in LastNameAL) Console. WriteLine(s) Console. ReadLine()

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.