| about | help | code help+videos | done | prefs |
findLuckyDigits
In China, 8 is considered a very lucky number. Create a method findLuckyDigits that takes in a three-digit number (num will always be 3 digits). Count how many digits are equal to 8. Return that count. findLuckyDigits(838) → 2 findLuckyDigits(888) → 3 findLuckyDigits(123) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy