Beispiel #1
0
        // Sum of numbers
        public double SumOfAllNumbers()
        {
            Console.WriteLine("Welcome to Addition!! \n\nHit Enter to continue.");
            Class1 class1 = new Class1();
            int    value  = 10;

            Console.ReadLine();
            return(class1.Addition(value));
        }
Beispiel #2
0
        // Average ten scores
        public double MostPeopleAreHere()
        {
            Console.WriteLine("Top Ten Average!!");
            Console.WriteLine("\nHit Enter to continue...");
            Class1 class1 = new Class1();

            Console.ReadLine();
            double value   = class1.Addition(10);
            double average = value / 10;

            Console.ReadLine();
            Console.Clear();
            Console.WriteLine($"Your student's average is {class1.Average(value, 10) / 100:P} resulting in a {class1.LetterGrade(average)}");
            return(class1.Average(value, 10));
        }
Beispiel #3
0
        //Average specific number of scores.
        public double TheGradesAreFixed()
        {
            Class1 class1 = new Class1();

            Console.WriteLine("The Grades are fixed and the results don't matter\n\nMostly...");
            Console.WriteLine("\nHit Enter to continue...");

            Console.ReadLine();
            Console.Write("How many Grades do you have to enter?: ");
            double count   = double.Parse(Console.ReadLine());
            double value   = class1.Addition(count);
            double average = value / count;

            Console.ReadLine();
            Console.Clear();
            Console.WriteLine($"Your student's average is {class1.Average(value, 10) / 100:P} resulting in a {class1.LetterGrade(average)}");
            return(class1.Average(value, count));
        }