about | help | code help+videos | done | prefs |
Write a method that returns the sum of the numbers in array 'nums', except do not include the digit 7 in the sum. Remove the digit 7 from all the elements of the arry. For example, if 'nums' is [475,7,27,71,7,7] you would return 426 since 405+20+1=426. Remember that the DIGIT 7 is not supposed to be included in the sum (the DIGIT 7, not just the number 7). Look at the test data for further examples. Keep in mind that when the digit 7 is omitted, it does not change the place value of all the other digits in the number. test2020_11_12_SLHL_sum2([32]) → 32 test2020_11_12_SLHL_sum2([7]) → 0 test2020_11_12_SLHL_sum2([7877, 507, 723, 771]) → 1324 ...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: 290
Copyright Nick Parlante 2017 - privacy