Esempio n. 1
0
        public static void FindOutMinAndMax(ODArray a)
        {
            var min = a.Array.Min();
            var max = a.Array.Max();

            Console.WriteLine($"Array {a.SerialNumber}:\nminimal element = {min}, maximum element = {max}");
        }
Esempio n. 2
0
 public static void CheckForNegative(ODArray a)
 {
     if (a)
     {
         Console.WriteLine($"Array {a.SerialNumber} doesn't contain negative element(s)");
     }
     else
     {
         Console.WriteLine($"Array {a.SerialNumber} contains negative element(s)");
     }
 }
Esempio n. 3
0
 public static void Compare(ODArray a1, ODArray a2)
 {
     if (a1 > a2)
     {
         Console.WriteLine($"Array {a1.SerialNumber} is longer than array {a2.SerialNumber}");
     }
     else
     {
         Console.WriteLine($"Array {a1.SerialNumber} is less than array {a2.SerialNumber}");
     }
 }
Esempio n. 4
0
 public Date(ODArray parent)
 {
     dateOfCreation = DateTime.Now;
     this.parent    = parent;
 }