public void FindKAndB(double x1, double y1, double x2, double y2, double expectedK, double expectedB) { double actualK = VariablesMath.SolveIndexK(x1, y1, x2, y2); double actualB = VariablesMath.SolveIndexB(x1, y1, x2, y2); Assert.AreEqual(expectedK, actualK); Assert.AreEqual(expectedB, actualB); }
static void Main(string[] args) { Console.WriteLine("Please enter A ="); double a = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Please enter B ="); double b = Convert.ToInt32(Console.ReadLine()); double x = VariablesMath.SimpleFraction(a, b); Console.WriteLine("X equal " + x); }
static void Main(string[] args) { Console.WriteLine("Please enter A ="); double a = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Please enter B ="); double b = Convert.ToInt32(Console.ReadLine()); double x = VariablesMath.SimpleDivision(a, b); double x1 = VariablesMath.FindRemainder(a, b); Console.WriteLine("Result: " + x + " Remaider: " + x1); }
public void FindXNegative(double a, double b, double c) { try { VariablesMath.FindX(a, b, c); } catch { Assert.Pass(); } Assert.Fail(); }
public void SimpleDivisionNegative(double a, double b) { try { VariablesMath.SimpleDivision(a, b); } catch { Assert.Pass(); } Assert.Fail(); }
public void FindKAndBNegative(double x1, double y1, double x2, double y2) { try { VariablesMath.SolveIndexK(x1, y1, x2, y2); VariablesMath.SolveIndexB(x1, y1, x2, y2); } catch { Assert.Pass(); } Assert.Fail(); }
static void Main(string[] args) { Console.WriteLine("Please enter A ="); double a = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Please enter B ="); double b = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Please enter C ="); double c = Convert.ToInt32(Console.ReadLine()); double x = VariablesMath.FindX(a, b, c); Console.WriteLine("X equal " + x); }
static void Main(string[] args) { double x1, y1, x2, y2; Console.WriteLine("Enter x1:"); x1 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter y1:"); y1 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter x2:"); x2 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter y2:"); y2 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("A (" + x1 + "," + y1 + ")"); Console.WriteLine("B (" + x2 + "," + y2 + ")"); double k = VariablesMath.SolveIndexK(x1, y1, x2, y2); double b = VariablesMath.SolveIndexB(x1, y1, x2, y2); Console.Write("Stright line equation: y="); Console.Write(k + "*x + " + b); }
public void FindX(double a, double b, double c, double expected) { double actual = VariablesMath.FindX(a, b, c); }
public void RemainderOfTheDivision(double a, double b, double expected) { double actual = VariablesMath.FindRemainder(a, b); Assert.AreEqual(expected, actual); }
public void SimpleDivision(double a, double b, double expected) { double actual = VariablesMath.SimpleDivision(a, b); Assert.AreEqual(expected, actual); }