about | help | code help+videos | done | prefs |
Write a method with two integer input parameters. As preconditions, you can assume that both integers are non-negative. Return the sum of the digits in the ones place in these numbers. For example, if the two integers are 562 and 11128, you would return 10 since the one's places are 2 and 8 and the sum of those is 2+8=10. However, if the sum of the digits in the one's place is 13, return -99 instead. test2024_10_08_APP1SLHL_onesSum(1276, 43987) → -99 test2024_10_08_APP1SLHL_onesSum(18, 42) → 10 test2024_10_08_APP1SLHL_onesSum(7382, 9124) → 6 ...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: 240
Copyright Nick Parlante 2017 - privacy