using System; namespace Cougars { /// /// Summary description for Class1. /// class Class1 { /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { scores s = new scores(); s.compareScores(); } } public class cougars { public string WSU, Other; public int WSUScore, OtherScore; public cougars(string inWSU, int inWSUScore, string inOther, int inOtherScore) { WSU = inWSU; WSUScore = inWSUScore; Other = inOther; OtherScore = inOtherScore; } } public class scores { public cougars[] games = new cougars[10]; public scores() { games[0] = new cougars("WSU", 36, "Idaho", 28); games[1] = new cougars("WSU", 55, "Nevada", 21); games[2] = new cougars("WSU", 48, "Grambling", 7); games[3] = new cougars("WSU", 33, "Oregon St.", 44); games[4] = new cougars("WSU", 21, "Stanford", 24); games[5] = new cougars("WSU", 41, "UCLA", 44); games[6] = new cougars("WSU", 38, "Cal", 42); games[7] = new cougars("WSU", 13, "USC", 55); games[8] = new cougars("WSU", 24, "Sun Devils", 27); games[9] = new cougars("WSU", 31, "Ducks", 34); } public void compareScores() { for (int i = 0; i < games.Length; i++) { if (games[i].WSUScore < games[i].OtherScore) { Console.WriteLine("Lost to " + games[i].Other + " by " + (games[i].OtherScore - games[i].WSUScore)); } else { Console.WriteLine("Beat " + games[i].Other + " by " + (games[i].WSUScore - games[i].OtherScore)); } } } } }