Calculating Averages Max and Min C++
<pre><code>// Input : Student name, 1 test grade perstudent
// Output: Student Averages, Class Averages, Top Student Last Student

#include &lt;string&gt;
#include &lt;iostream&gt;
using namespace std;

float CalcAvgClassGrade(int s1, int s2, int s3, int s4, int s5)

{
    float avg, sum;

    // Sum grades, and get avg
    sum = s1 + s2 + s3 + s4 + s5;
    avg = sum / 2;
    return avg;
}

string  getMax(int s1, int s2, int s3, int s4, int s5, string n1, string  n2, string n3, string n4, string n5)
{
    float max;
    string maxName;
    // Compares each grade to find the max
    max = s1;
    maxName = n1;
    if (max &lt;  s2)
    {
        max = s2;
        maxName = n2;
    }
    if (max &lt;  s3)
    {
        max = s3;
        maxName = n3;
    }
    if (max &lt;  s4)
    {
        max = s4;
        maxName = n4;
    }
    if (max &lt;  s5)
    {
        max = s5;
        maxName = n5;
    }


    return maxName;

}

string getMin(int s1, int s2, int s3, int s4, int s5, string n1, string n2, string n3, string n4, string n5) 
{

    float min;
    string minName;
    // Compares each grade to find the min
    min = s1;
    minName = n1;
    if (min &lt;  s2)
    {
        min = s2;
        minName = n2;
    }
    if (min &lt; s3)
    {
        min = s3;
        minName = n3; 
    }
    if (min &lt;   s4);
    { 
        min = s4;
        minName = n4;
    }
    if (min &lt;  s5)
    {
        min = s5;
        minName = n5;
    }
    return minName;

}



int main()
{
    string student1, student2, student3, student4, student5;
    int student1Grade, student2Grade, student3Grade, student4Grade, student5Grade;

    // Enter Student Names;
    cout &lt;&lt; "Enter Student Name: ";
    cin &gt;&gt; student1;
    cout &lt;&lt; "Enter Student Grade: ";
    cin &gt;&gt; student1Grade;

    cout &lt;&lt; "Enter Student Name: ";
    cin &gt;&gt; student2;
    cout &lt;&lt; "Enter Student Grade: ";
    cin &gt;&gt; student2Grade;

    cout &lt;&lt; "Enter Student Name: ";
    cin &gt;&gt; student3;
    cout &lt;&lt; "Enter Student Grade: ";
    cin &gt;&gt; student3Grade;

    cout &lt;&lt; "Enter Student Name: ";
    cin &gt;&gt; student4;
    cout &lt;&lt; "Enter Student Grade: ";
    cin &gt;&gt; student4Grade;


    cout &lt;&lt;"Enter Student Name : " ;
    cin &gt;&gt; student5;
    cout &lt;&lt;"Enter Student Grade : " ; 
    cin &gt;&gt; student5Grade;
         // Class AVG 
    float classAvg = CalcAvgClassGrade(student1Grade, student2Grade, student3Grade, student4Grade, student5Grade);

    cout &lt;&lt; "Class average = " &lt;&lt; classAvg; 

        // MAX GRADE 

    string classMax = getMax(student1Grade, student2Grade, student3Grade, student4Grade, student5Grade, student1, student2, student3, student4, student5); 

    cout &lt;&lt; classMax &lt;&lt; " has the highest grade in the class"; 

        // Min Grade 

    string classMin = getMin(student1Grade, student2Grade, student3Grade, student4Grade, student5Grade, student1, student2, student3, student4, student5); 
    cout &lt;&lt; classMin &lt;&lt; " has the lowest grade in the class"; 

}
</code></pre>

<p>This is my first c ++ program. I am having trouble formatting the cout statements , also i think there is some errors in my math because i keep getting a values like 2.56 x e. Any suggestion is appreciated, I have learned alot about syntax so far. I dont think my syntax is correct on the cout statements. Do i need to use endl? </p>