static void Main(string[] args) { Console.WriteLine("3 + 2 = {0}", IntCalc.Add(3, 2)); Console.WriteLine("3 - 2 = {0}", IntCalc.Sub(3, 2)); IntCalc2.OutMessage(); Console.WriteLine(); }
public void CallServerLib() { int a = 3, b = 2; Console.WriteLine("{0} + {1} = {2}", a, b, IntCalc.Add(a, b)); Console.WriteLine("{0} - {1} = {2}", a, b, IntCalc.Sub(a, b)); }
static void Main(string[] args) { int num1 = 20, num2 = 50; int result = 0; result = IntCalc.Add(num1, num2); Console.WriteLine("{0} + {1} = {2}", num1, num2, result); result = IntCalc.Sub(num1, num2); Console.WriteLine("{0} - {1} = {2}", num1, num2, result); result = IntCalc.Mul(num1, num2); Console.WriteLine("{0} * {1} = {2}", num1, num2, result); result = IntCalc.Div(num1, num2); Console.WriteLine("{0} / {1} = {2}", num1, num2, result); }