static void Main(string[] args) { // 1. SORTED ARRAY SMALLEST TO HIGHEST int[] nums = new int[] { 9, 12, 4, 7, 8, 11 }; var a = new SortArray(); var ar = a.SortedArrayByLowestNumber(nums); foreach (var i in ar) { Console.WriteLine(i); } // 2. FIBONNACI CALCULATE NTH SEQUENCE var f = Fibonacci.CalculateNthFibonacci(13); Console.WriteLine(f); // 3. PALINDROME var p = new Palindromes(); var ps = p.IsPalindromes("A man a plan a canal Panama"); Console.WriteLine(ps); // 4. SQUARE ROOT var r = new SquareRoot(); var sq = r.SquareRootNumber(60); Console.WriteLine(sq); }
public void Fibonacci13thSequence() { var f = Fibonacci.CalculateNthFibonacci(13); var actual = 233; Assert.Equal(f, actual); }
public void Fibonacci4thSequence() { var f = Fibonacci.CalculateNthFibonacci(4); var actual = 3; Assert.Equal(f, actual); }