id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > test2020_12_10_APP1SLHL_sumOnesPlaces
prev  |  next  |  chance

Write a method that finds the sum of all the digits in the ones-places of all the elements in the array of positive integers. For example, if the input array is {8241,24,43,80} you would return 8 since the sum of all the digits in the ones place is 1+4+3+0=8.


test2020_12_10_APP1SLHL_sumOnesPlaces([5325]) → 5
test2020_12_10_APP1SLHL_sumOnesPlaces([32, 457, 463, 86]) → 18
test2020_12_10_APP1SLHL_sumOnesPlaces([55, 1, 2, 7, 9, 33]) → 27

...Save, Compile, Run (ctrl-enter)

public int test2020_12_10_APP1SLHL_sumOnesPlaces(int[] nums) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 280

Copyright Nick Parlante 2017 - privacy