Пример #1
0
 static void Main(string[] args)
 {
     /*List all the multiples of 3 and 5 below 1000 and add them together*/
     int sum = 0;
     MultipleMaker mm = new MultipleMaker();
     sum = mm.getsum(3, 1000);
     sum += mm.getsum(5, 1000, 3);
     Console.WriteLine("Multiples of 3 and 5 less than 1000 summed: {0}", sum);
     Console.ReadKey();
 }
Пример #2
0
        static void Main(string[] args)
        {
            /*List all the multiples of 3 and 5 below 1000 and add them together*/
            int           sum = 0;
            MultipleMaker mm  = new MultipleMaker();

            sum  = mm.getsum(3, 1000);
            sum += mm.getsum(5, 1000, 3);
            Console.WriteLine("Multiples of 3 and 5 less than 1000 summed: {0}", sum);
            Console.ReadKey();
        }