1. ## A newbie

Hi guys I need some help with pointers. The code below doesn't work. What am I doing wrong?.

Code:
```#include <stdio.h>

int main()
{
int NumStudents;     /* number of students in class       */
int MaxTotalPoints;  /* total number of possible points   */

printf("This program finds the average for each student.\n\n");
return 0;
}

/*
* Function to read and return the number of students
* Pre:  none
* Post: The (positive) number of students was returned.
*/

{
/* number of students in class */

printf("How many students are in the class? ");
scanf("%d", &pt_NumStudents);
while (pt_NumStudents <= 0)
{
printf("The number of students must be positive.\n");
printf("How many students are there? ");
scanf("%d", &pt_NumStudents);

}

}
/*
* Pre:  none
* Post: The (positive) number of grades was returned.
*/

{
/* number of grades for each student */

printf("How many course grades each student has? ");
{
printf("The number of course grades must be positive.\n");
printf("How many course grades each student has? ");
}

}
/*
* Function to return the maximum total number of points
* possible for a student to earn.
* Post: The (positive) maximum possible points was returned.
*/

{
/* total number of possible points */

printf("\nEnter the maximum grade for each course.\n");
while (*pt_MaxTotalPoints <= 0)
{
printf("The total maximum grade must be positive.\n");
}

}
/*
* Function to compute and print the average of each student
* Pre:  NumStudents is the (positive) number of students.
*       MaxTotalPoints is the (positive) total worth of grades.
* Post: Each student's average was displayed.
*/

{
int student;         /* index - which student */
int TotalPoints;     /* total number of points */
float average;       /* student's average */

for (student = 1; student <= NumStudents; student++)
{
printf("\nEnter the grades for student %d.\n", student);

average = (float)100 * TotalPoints / MaxTotalPoints;

printf("\nAverage for student %d = %.1f%%\n",student, average);
}
}

/*
* Post: The nonnegative total grade points was returned.
*/

{

pt_TotalPoints = 0;

}
/*
* Post: A nonnegative grade was returned.
*/

{
int points;                  /* points for one test*/

do
{
scanf("%d", &points);
}while (points < 0);

return points;
}```
And this is the errors I am getting when I compile it.

Code:
```test.c: In function `GetMaxTotalPoints':
test.c:78: void value not ignored as it ought to be
test.c:83: void value not ignored as it ought to be
test.c:105: void value not ignored as it ought to be```
thanks

`pt_MaxTotalPoints = ReadAddGrades(NumOfGrades);`