about | help | code help+videos | done | prefs |
Write a method that returns the sum of the digits in 'num' except do NOT count any occurrence of 'excludeDigit'. For example, if 'num' is 812451 and 'excludeDigit' is 1, you would return 19 since 8+2+4+5=19. quiz2020_12_15_P1SLHL_sumDigitsExclude(54678, 2) → 30 quiz2020_12_15_P1SLHL_sumDigitsExclude(123456, 7) → 21 quiz2020_12_15_P1SLHL_sumDigitsExclude(54678, 8) → 22 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy