title: How to find the smallest value in an array without using C# Math function?
body: <p>I am using C# and I am doing some questions for revision. I am trying to find the smallest value in a randomly generated array (which I coded). My teacher requires us to find the smallest value in that array without using the .Min function, because this is an algorithm module. Code below shows what I have coded to create the array. Have no idea how to proceed from here. Thank you guys.</p>
  
  <pre><code>int[] myRandom = new int[10];
  int min = 0;
  int max = 19;
  
  Random randNum = new Random();
  
  for (int i = 0; i &lt; 10; i++)
  {
      myRandom[i] = randNum.Next(min, max);
  }
  
  for (int i = 0; i &lt; 10; i++)
  {
      Console.WriteLine(myRandom[i]);
  }
  </code></pre>