Row array game Scores contains all player scores. Construct a row array high Scores than contains all
Fantastic news! We've Found the answer you've been seeking!
Question:
Row array game Scores contains all player scores. Construct a row array high Scores than contains all player scores greater than min Score.
Ex: If game Scores is [2, 5, 7, 6, 1, 9, 1] and min Score is 5, then high Scores should be [7, 6, 9].
function high Scores = Get High Scores(game Scores, min Score)
% game Scores: Array contains all player scores
% min Score: Scores greater than min Score are added to high Scores
meets Thres hold = (game Scores > min Score); % Logic array indicates which
% elements are greater than min Score
% Construct a row array high Scores containing all player scores greater than min Score
high Scores = 0;
end;
Related Book For
Probability & Statistics for Engineers & Scientists
ISBN: 978-0130415295
7th Edition
Authors: Ronald E. Walpole, Raymond H. Myers, Sharon L. Myers, Keying
Posted Date: