static void ArmstrongLoop(int loopSize) { MathStuff ms = new MathStuff(); for (int n = 0; n <= loopSize; n++) { if (ms.ArmstrongNumberCheck(n)) { Console.WriteLine("{0} is an Armstrong Number!", n.ToString()); } } }
static void AddNumbers() { MathStuff ms = new MathStuff(); Console.WriteLine("Plus Method: " + ms.PlusMethod(8, 9)); Console.WriteLine("Plus Method: " + ms.PlusMethod(8.01, 9.01)); Console.WriteLine("Plus Method: " + ms.PlusMethod(8, 9, 10)); Console.WriteLine("Plus Method: " + ms.PlusMethod(8.5, 9.7, 10.15)); Console.WriteLine("Mult Method: " + ms.MultMethod(8, 9)); Console.WriteLine("Mult Method: " + ms.MultMethod(8.01, 9.01)); }
static void Armstrong() { Console.Write("Enter number: "); int n = int.Parse(Console.ReadLine()); MathStuff ms = new MathStuff(); if (ms.ArmstrongNumberCheck(n)) { Console.WriteLine("Armstrong Number!"); } else { Console.WriteLine("Not Armstrong Number!"); } }