static void Main(string[] args) { var input = int.Parse(Console.ReadLine()); var card = new Card(input, 11); var r = card.Rank; card.Suit = 14; var num1 = GetNumber("Give me the first number"); Console.WriteLine("What ist he operation?"); var op = GetOperation(); var num2 = GetNumber("Give me the second number"); var answer = 0; switch (op) { case Operations.Add: answer = Logic.Add(num1, num2); break; case Operations.Subtract: answer = Logic.Subtract(num1, num2); break; case Operations.Multiply: answer = Logic.Multiply(num1, num2); break; case Operations.Divide: answer = Logic.Division(num1, num2); break; } Console.WriteLine($"{num1} {op} {num2} = {answer}"); Console.ReadLine(); }
public void DivisionTest() { Logic target = new Logic(); // TODO: Initialize to an appropriate value int a = 10; // TODO: Initialize to an appropriate value int b = 5; // TODO: Initialize to an appropriate value int expected = 2; // TODO: Initialize to an appropriate value int actual; actual = target.Division(a, b); Assert.AreEqual(expected, actual); }