0
Why No Output ?
using System; using System.Collections.Generic; namespace SoloLearn { class Program { static void Main(string[] args) { int numOfPlayers = Convert.ToInt32(Console.ReadLine()); List<int> scores = new List<int>(); int count = 0; while (count<numOfPlayers) { int score = Convert.ToInt32(Console.ReadLine()); //your code goes here scores.Add (score); } scores.Sort(); for (int x = 0; x<scores.Count; x++) Console.WriteLine (scores[x] + " "); } } }
1 Respuesta
+ 3
while(condition){
//some code
count++;
}