title: How to fill an array with random floating point numbers?
body: <p>I'm hoping to find a way to fill an array with random floating point numbers. My array is size 50 and I'm hoping to fill this array with random float numbers from range 1-25. Here is what I have so far. I greatly appreciate any tips or answers anyone can offer. Thank you. </p>
  
  <pre><code>#include &lt;iostream&gt;
  
  #include &lt;ctime&gt;
  
  #include &lt;cstdlib&gt;
  
  using namespace std;
  
  
  int main()
  
  {
  
  float myArray[50];
  
  
  for(int i = 1; i &lt;= 25; i++)
  
  {
  
  srand(time(0));
  
  
  myArray[i] = (rand()% 50 + 1);
  
  cout &lt;&lt; myArray[i] &lt;&lt; endl;
  
  
  
  system("Pause");
  
  return 0;
  
  } 
  
  }
  </code></pre>