public void Task7Test() { NumReverse instance = new NumReverse(); Assert.AreEqual(625, instance.Reverser(526)); Assert.AreEqual(0, instance.Reverser(0)); Assert.AreEqual(1, instance.Reverser(1)); Assert.AreEqual(13, instance.Reverser(31)); }
static void Reverser() { NumReverse inst = new NumReverse(); Console.WriteLine("Enter integer number to reverse: "); int input = 0; while (!(int.TryParse(Console.ReadLine(), out input))) { Console.WriteLine("Enter valid number!"); } Console.WriteLine(inst.Reverser(input)); }