需要帮助来重写这个循环,我觉得我很遥远,并且确定它不是正确的方法,它是唯一阻止我的程序运行的方法。任何人都可以引导我朝着正确的方向前进。如果您需要更多信息,请告诉我
//--modifier
void student::completedCourse(double credits, double numericGrade)
{
my_credits += credits;
for (my_qualityPoints; credits; numericGrade;)
}
这是来自头文件
//--modifier
void completedCourse(double credits, double numericGrade);
// post: record a completed course by adding credits to my_credits
// and incrementing the qualityPoints by (credits * numericGrade)
// aStudent.completedCourse(4.0, 3.67) // a 4 credit A- perhaps