Hi everyone, glad to be here...
BTW, this is my first post...
please i need help on this
Write a function that is given a list of students' grades (on a scale from 0 to 100), and returns the number of students who have an A in the class (grade >= 90).
here is my code, it is given me the grades but not the number of students
actually it suppose to be in pseudocode but i did the program in PHP
$list = array(0, 10, 20, 20, 40, 30, 80, 90, 90, 80, 98, 94);
function searchAgrades($list) {
for ($i = 0; $i <= count($list); $i++) {
if ($list[$i] >= 90) {
echo $list[$i] . " ";
}
}
}
searchAgrades($list);
cheers Yirax