You may want to re-order your function callsCode:do { getInput(student); displayRecord(student); student.percent = computePercent(student.totalpts, maxpts); // student.totalpts is not initialized
Code:do { getInput(student); displayRecord(student); student.totalpts = computePointsEarned(student.quiz_1, student.quiz_2, student.midterm_score, student.final_score); student.percent = computePercent(student.totalpts, maxpts);