public void Task9020Test() { Assert.AreEqual(23.4307, Lab02.Task9020(0), 0.0001); Assert.AreEqual(25.0998, Lab02.Task9020(-9), 0.0001); Assert.AreEqual(0, Lab02.Task9020(61), 0.0001); Assert.AreEqual(3, Lab02.Task9020(60), 0.0001); }
static void Step9020() { Console.WriteLine(); Console.WriteLine("9020"); int[] in9020 = { 0, -9, 61, 60, 62, 7573, 75 }; double[] outs9020 = { 23.4307, 25.0998, 0, 3, 0, 0, 0 }; for (int i = 0; i < in9020.Length; i++) { try { double result = Lab02.Task9020(in9020[i]); Console.WriteLine("{0:F6} ({1:F6})", result, outs9020[i]); } catch (Exception e) { Console.WriteLine(e.Message); } } }
public void Task9020Assertion3() { Lab02.Task9020(75); }
public void Task9020Assertion2() { Lab02.Task9020(7573); }
public void Task9020Assertion1() { Lab02.Task9020(62); }