about | help | code help+videos | done | prefs |
Write a method that has a single input parameter 'num'. As a precondition you may assume that 'num' will be a two-digit positive integer. Return the sum of the digits in 'num'. For example, if 'num' is 27 you will return 9 since 2+7=9. Look at the test data for more examples. test2020_11_12_APP1SLHL_addDigits(84) → 12 test2020_11_12_APP1SLHL_addDigits(85) → 13 test2020_11_12_APP1SLHL_addDigits(86) → 14 ...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: 210
Copyright Nick Parlante 2017 - privacy