Question: Why Is my low and high not calculating correctly? This function determines the lowest score input. //**************************************************************** double findLowScore(double scores[]) { double lowest; lowest =
Why Is my low and high not calculating correctly? This function determines the lowest score input. //**************************************************************** double findLowScore(double scores[]) { double lowest; lowest = 10; //determine lowest score for (int count = 1; count <= 5; count++) { if (lowest > scores[count]) lowest = scores[count]; } return lowest; } //**************************************************************** //This function determines the highest score input. //**************************************************************** double findHighScore(double scores[]) { double highest = -1; //determine highest score. for (int count = 0; count < 5; count++) { if (highest < scores[count]) highest = scores[count]; } return highest; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
