// This program is asking for the name of student
// 3 name assignments and grade for those assignments
// then to calculate those grades and to display with
// their name and decimal and to use a table
int main()
{
string name;
string assignment[3];
int grades[3];
double average;
// get the name of student
name = getName();
// Enter the name of assignments
getAssignments(assignment);
//Enter the grades for the three assignments they listed
getGrades(grades, assignment);
//Now lets average the grades of the three assignments
cout << "Please enter the name of first assignment: ";
getline(cin, assignment[0]);
cout << "Please enter the name of second assignment: ";
getline(cin, assignment[1]);
cout << "Please enter the name to third assignment: ";
getline(cin, assignment[2]);
}
void getGrades(int grades[], string assignment[])
{
int grades;
string assignment;
cout << "Please enter the grade you recieved for " << assignment[0] << " : ";
cin >> grades[0];
cout << "Please enter the grade you recieved for " << assignment[1] << " : ";
cin >> grades[1];
cout << "Please enter the grade you recieved for " << assignment[2] << " : ";
cin >> grades[2];
}
double getAverage(int grades[])
{
int grades;
void getAssignments(string assignment[])
{
string assignment; // Why is this here? You already have something called "assignment" - the parameter you passed in
You keep declaring some variables having the same name with the ones you pass to functions, change their name or remove if not necessary. And please use [code][/code] tags.