cout << "\nPlease enter your student number.(enter 999 to exit)" << endl;
cin >> student_id;
if ( student_id == 999 )
break;
do
{
cout << "\nPlease enter your marks for exam." << endl;
cin >> exam_mark;
checkScore_exam(exam_mark); // function called here
} while ( exam_mark > 100 || exam_mark < 0 );
do
{
cout << "\nPlease enter your marks for quiz." << endl;
cin >> quiz_mark;
checkScore_quiz(quiz_mark); // function called here
} while ( quiz_mark > 100 || quiz_mark < 0 );
do
{
cout << "\nPlease enter your marks for programming assignment." << endl;
cin >> programming_mark;
checkScore_programming_assignment(programming_mark); // function called here
double mark_exam = (exam / 100) * 30; // find final score for the exam mark
double mark_quiz = (quiz / 100) * 10; // find final score for the quiz mark
double mark_programming = (programming / 100) * 15; // find final score for the programming assignment mark
double mark_lab = (lab / 100) * 25; // find final score for the lab exercise mark
double mark_test = (test / 100) * 20; // find final score for the test mark
double total_mark = (mark_exam + mark_quiz + mark_programming + mark_lab + mark_test); // find total score of all the components
return total_mark;