Code:
#include <stdio.h>
void welcome(void);
void processOneStudent(int *numStudentsPtr, int *studentIdPtr, int *yearPtr, int *cumulativeHoursPtr, float *cumulativeGPAPtr);
void reportStudentData(int studentId, int class, int cumulativeHours, float cumulativeGPA);
int applyCriteria(void);
void reportSummary(void);
char more_students;
int main(){
welcome();
printf("More Students (Y or N):\t");
scanf("%c", &more_students);
if(more_students=='Y'||'y'){
processOneStudent(int *numStudentsPtr, int *studentIdPtr, int *yearPtr, int *cumulativeHoursPtr, float *cumulativeGPAPtr);
else if(more_students=='N'||'n')
}
system ("pause");
return 0;
}
void welcome(void){
printf("\n%s%s%s%s\n",
"***********************************************\n\n",
"* Welcome to the Academic Standing System *\n\n",
"* Developed by Drem Darios *\n\n",
"***********************************************\n");
}
void processOneStudent(int *numStudentsPtr, int *studentIdPtr, int *yearPtr, int *cumulativeHoursPtr, float *cumulativeGPAPtr ){
int hours;
int grade;
printf("Enter student id, class, cum. hours, cum. GPA:\t");
scanf("%d%d%d%f", &studentIdPtr, &yearPtr, &cumulativeHoursPtr, &cumulativeGPAPtr);
printf("Hours and grade (0 0 to end)?\t");
scanf("%d%d", &hours, &grade);
while ( hours<0 && grade<0){
printf("Hours and grade (0 0 to end)?\t");
scanf("%d%d", &hours, &grade);
}
}
void reportStudentData(int studentId, int year, int cumulativeHours, float cumulativeGPA){
printf("Student Id:\t%d\n", studentId);
printf("Class:\t%d\n", year);
printf("New Cumulative Hours:\t%d\n", cumulativeHours);
printf("New Cumulative GPA:\t%.2f\n", cumulativeGPA);
}
void reportSummary(int numStudents, int numInGoodStanding){
printf("Number of Students:\t%d\n", numStudents);
printf("Number in Good Standings\t%d\n",numInGoodStanding);
printf("\nThank you for using the Academic Standing System. Bye bye!");
}