← Unit 2 · all exercises
Saved in this browser only

Small, medium or large

Return "small" for anything under 10, "medium" for 10 up to but not including 100, and "large" for 100 or more.

String size(int n)

Solution.java
Loading editor…
Results

Examples

  • size(5) → small
  • size(50) → medium

There are also 4 hidden tests you can't see. Solve the problem, not the examples.