title: How do i find the maximum number in an Array using a function
body: <p>In my c++ class, i'm supposed to use this " int mymaximum(int a[], int numberOfElements); " function to find the maximum number in an Array. The function should return the largest in this array.</p>
  
  <p>This is the code I have so far without the function I need to use. Thanks in advance and sorry about the messy code, still learning.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main() {
  int Array[] = {23,2,90,53,38};
  int mymaximum = 0;
  
  for(int i = 0; i &lt; 5; i++){
      if(Array[i] &gt; mymaximum){
          mymaximum = Array[i];
      }
  }
  cout &lt;&lt; "The Max is: " &lt;&lt; mymaximum &lt;&lt; "\n";
  return 0;
  }
  </code></pre>