|
|
PLEASE ALWAYS USE CODE TAGS (the <> formatting button), to the right of this box, when posting code. Along with the proper indenting it makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/ Hint: You can edit your post, highlight your code and press the <> formatting button. You can use the preview button at the bottom to see how it looks. I found the second link to be the most help. |
F5 and nothing happens. |
double judgeScores[5]{ 9, 8, 7, 9, 8 };
. And you can change the numbers to anything you would like. Then put a comment on the line //inputScores(judgeScores);
. This lets you skip having to enter 5, hint hint nudge nudge, every time the program runs and allows you to use the same numbers for testing. BTW these numbers total 41 and when you subtract the high and low it ends up 25. Did not really plan it that way, it just worked out that way.if (lowest > scores[count])
, but tends to be a bit confusing. This would be a better way to write this line if (scores[count] < lowest)
. Sometimes it makes no difference for something like this line and sometimes it makes a big difference on the order. The bigger point is the it is easier to read and understand what it is doing and the use of the "<" or ">" also helps to make the function more understandable as to what it is doing.double lowest = 99999.0;
. This works, but you do not need such a high number. Since the highest score is 10 this number can be 10 or 11.