
Patrick B. answered 04/12/21
Math and computer tutor/teacher
using System;
public class Program
{
public static void Main(string [] args)
{
Console.Write("How many people are in your class? :>");
int classSize = Int32.Parse(Console.ReadLine());
string[] students = new string[classSize];
for(int i = 0; i<classSize; i++)
{
Console.Write("Please enter person "+ (i+1) + ":>");
students[i] = Console.ReadLine();
Console.Clear();
}
Array.Sort(students);
Console.WriteLine("The people in your class in alphabetical order are: ");
foreach(string name in students)
{
Console.Write(name + " ");
}
} //main
}