B4Coder

🎓 Student Explorer · Mission 6 of 13

🏆 The Top Scorer

Who topped the class? Find the student with the highest marks, without looking yourself.

Your mission

  1. Make best = 0 and bestName = "".
  2. Go through students. When s.marks > best: best = s.marks and bestName = s.name.
  3. At the end, Tell bestName + " topped with " + best.

Getting the mission ready…