There are 2000 students in a course. They wrote a mathematics test which was scored out of 40 and then converted to percentage.

1. Draw a flowchart that reads the name, sex and score of each student, and outputs the names of the female students that scored below 45% and how many they are.
2. Write a pseudocode program that reads the name, sex and score of each student, and outputs the names of the female students that scored below 45% and how many they are.

1 answer

For the code, something like

count=0
for i=1..2000
  with student[i] do {
    read   name,sex,score
    pct = score*5/2
    sub45 = false
    if pct < 45 then
      if sex = "F" then
      count++
      print name
    }
  }
}
print "There were ",count," females scoring below 45%"