Practice · 2 of 4
Input classifier
CHALLENGE
Difficulty: beginner+25 XP
Implement static string Classify(string input): return "empty" for null/whitespace-only input, "not-a-number" when it isn't an int, "negative" when the int is < 0, otherwise "ok:" + n.
Press Submit to check your solution.
Back to lesson: Practice: Parse and validate