B4Coder

🎓 Student Explorer · Mission 13 of 13

🥇 Topper, Typed

The prize goes to the class topper. Find them, with every value's datatype: a name is a String, marks are an Integer.

Your mission

  1. best is an Integer (start at 0), topName a String (start at "").
  2. For Each s in students: if s.marks > best, best = s.marks and topName = s.name.
  3. Tell topName + " topped with " + best.

Getting the mission ready…