static void Main(string[] args)
        {
            Average a = new Average();

            for (int i = 0; i < 10; i++)
            {
                Console.Write("Enter an integer value: ");
                a.averageNum(Convert.ToInt32(Console.ReadLine()));
            }//end loop

            a.getAverage();//this is unnecessary given how Average.ToString is coded

            Console.WriteLine(a);

            Console.Write("Press any key to continue... ");
            Console.ReadLine();
        }
Exemple #2
0
        static void Main(string[] args)
        {

            Average a = new Average();

            for (int i = 0; i < 10; i++)
            {
                Console.Write("Enter an integer value: ");
                a.averageNum(Convert.ToInt32(Console.ReadLine()));
            }//end loop

            a.getAverage();//this is unnecessary given how Average.ToString is coded

            Console.WriteLine(a);

            Console.Write("Press any key to continue... ");
            Console.ReadLine();
        }//end main