static void Main(string[] args) { int high; Console.WriteLine("Enter the number of inputs: "); high = Convert.ToInt32(Console.ReadLine()); int low = 0; int[] A = new int[high]; Console.WriteLine("Enter the numbber you want to add:"); for (int i = 0; i < high; i++) { A[i] = Convert.ToInt32(Console.ReadLine()); } addition a = new addition(); int result = a.RecursiveAdd(A, low, high - 1); // Line A Console.WriteLine("Sum: " + result); Console.ReadKey(); }
public void CalculateAdditionTestStrong(double firstValue, double secondValue, double expected) { ITwoArgumentCalculator calculator = new addition(); double result = calculator.Calculate(firstValue, secondValue); Assert.AreEqual(expected, result); }
static void Main(string[] args) { addition a = new addition(); int ans = a.sum(2, 4); Console.WriteLine(ans); Console.ReadKey(); }
/// <summary>Defines the entry point of the application.</summary> /// <param name="args">The arguments.</param> static void Main(string[] args) { addition cal = new addition(); int c = cal.AddNumber(4, 5); Console.WriteLine("Hello World......in demo branch"); //string xyz = Console.ReadLine(); Console.WriteLine(c); }
public void RandomAddNumbers() { addition showlnum = new addition(); showleftnumber = showlnum.ranFnumber(1, 101); addition showrnum = new addition(); showrightnumber = showrnum.ranLnumber(1, 101); }
static void Main(String[] args) { addition a = new addition(); Console.WriteLine("Enter Two Numbers:"); int x = Int32.Parse(Console.ReadLine()); int y = Int32.Parse(Console.ReadLine()); Console.WriteLine(a.add(y, x)); Console.ReadKey(); }
static void Main(string[] Args) { Console.Write("Enter Number 1: "); int n1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter Number 2: "); int n2 = Convert.ToInt32(Console.ReadLine()); addition add = new addition(); Console.WriteLine("Sum of both numbers: {0}", add.add(n1, n2)); Console.ReadKey(); }
static void Main(string[] args) { addition a = new addition(); subtraction b = new subtraction(); multiplication c = new multiplication(); division d = new division(); int i, j; Console.WriteLine("enter the first integer:"); i = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("enter the first integer:"); j = Convert.ToInt32(Console.ReadLine()); a.process(i, j); b.process(i, j); c.process(i, j); d.process(i, j); Console.ReadKey(); }
static void Main(string[] args) { int n; Console.WriteLine("Enter the number of inputs: "); n = Convert.ToInt32(Console.ReadLine()); int[] arr = new int[n]; Console.WriteLine("Enter the numbber you want to add:"); for (int i = 0; i < n; i++) { arr[i] = Convert.ToInt32(Console.ReadLine()); } addition a = new addition(); int result = a.RecursiveAdd(arr, n); // Line A Console.WriteLine("Sum: " + result); Console.ReadKey(); }