Still isn't working..
Here is my most recent code:
..which yieldsCode:#include <stdio.h>
#include <stdlib.h>
void welcome();
void processOneStudent();
void returnStudentData(int* studentId, int* class, int* cumulativeHours, float* cumulativeGPA);
void reportSummary();
int main () {
char moreStudents;
welcome();
while (1) {
printf("more students (Y or N)? ");
scanf("%c", &moreStudents);
if (!((moreStudents == 'Y')||(moreStudents == 'y'))) {
continue;
}
processOneStudent();
}
reportSummary();
return(0);
}
void welcome() {
printf("*************************************************\n");
printf("* Welcome to the Academic Standing System *\n");
printf("* Developed by Hugh Saddler *\n");
printf("*************************************************\n\n");
}
void processOneStudent() {
int numStudents, studentId, class, cumulativeHours, credit, hour;
float cumulativeGPA;
numStudents = numStudents + 1;
printf("Enter student id, class, cum. hours, cum. GPA: ");
scanf("%d%d%d%f", &studentId, &class, &cumulativeHours, &cumulativeGPA);
do {
printf("Hours and grade (0 0 to end)? ");
scanf("%d%d", &hour, &credit);
cumulativeGPA = ((cumulativeGPA*cumulativeHours)+(credit*hour))/(cumulativeHours+hour);
cumulativeHours = cumulativeHours + hour;
}
while ((credit > 0)||(hour > 0));
if ((credit == 0)||(hour == 0)) {
returnStudentData(&studentId, &class, &cumulativeHours, &cumulativeGPA);
}
}
void returnStudentData(int* studentId, int* class, int* cumulativeHours, float* cumulativeGPA) {
printf("\n");
printf("Student Id: %d\n", *studentId);
printf("Class: %d\n", *class);
printf("New cumulative hours: %d\n", *cumulativeHours);
printf("New cumulative GPA: %.2f\n", *cumulativeGPA);
printf("\n");
}
void reportSummary() {
printf("\n");
printf("Number of students = \n");
printf("Number in good standing = \n");
printf("\n");
printf("Thank you for using the Academic Standing System. Bye bye!\n");
}
more students (Y or N)? n
more students (Y or N)? more students (Y or N)? y
Enter student id, class, cum. hours, cum. GPA: 1001 2005 10 3.30
Hours and grade (0 0 to end)? 4 4
Hours and grade (0 0 to end)? 3 3
Hours and grade (0 0 to end)? 0 0
Student Id: 1001
Class: 2005
New cumulative hours: 17
New cumulative GPA: 3.41
more students (Y or N)? more students (Y or N)?
How do I properly call the reportSummary() function when a user inputs 'N' or 'n'? And why is it printing "more students (Y or N)?" twice?
I have tried nearly EVERYTHING and I still don't understand how to write this part of the program. I would appreciate it if someone could really help to fix and explain this to me. Thanks!

