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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started