using System;
using System.Collections.Generic;
namespace Randal_the_Snitch
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Alright, so how many kids got the detention slip today?");
int studentCount = Convert.ToInt32(Console.ReadLine());
if (studentCount >= 20 ) {
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Wow, are kids today just born stupid?");
Console.ForegroundColor = ConsoleColor.Yellow;
Console.ReadKey();
Console.WriteLine("Whatever just give me the names:");
Console.ForegroundColor = ConsoleColor.White;
}
else if (studentCount == 1) {
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("Wow really? The students here are never behaved!\n");
Console.ReadKey();
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("Well whats the unlucky fellows name?");
}
else {
Console.WriteLine("Alright Give me the names");
}
string[] students = new string[studentCount];
for (int i = 0; i < studentCount; i++)
{
students[i] = Console.ReadLine();
}
Console.WriteLine("-----------------");
Array.Sort(students);
for (int i = 0; i < studentCount; i++)
{
Console.WriteLine(students[i]);
}
Console.WriteLine("List Completed!");
Console.ReadKey();
if (studentCount >= 20 ) {
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("\nHope those rotten kids enjoy their detention.");
Console.ForegroundColor = ConsoleColor.White;
}
else if (studentCount == 1) {
Console.WriteLine("\nWell I hope they think about what they did.");
Console.ForegroundColor = ConsoleColor.White;
}
else {
Console.WriteLine("\nHope they learn a lesson");
}
// wait for input to close
Console.ReadKey();
}
}
}