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

 

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

Write a method that finds the sum of all the integers in an input parameter array 'nums' and returns the one's place digit of that sum. For example, {7,3,100,18,6} has a sum of 134. That sum has a one's place digit of 4. So with that input parameter array, the returned result would be 4. Look at the test data for additional examples.


mar7_2016_APSLHL_sumLastDigit([9, 9, 9, 9, 9, 9, 9]) → 3
mar7_2016_APSLHL_sumLastDigit([]) → 0
mar7_2016_APSLHL_sumLastDigit([7]) → 7

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

public int mar7_2016_APSLHL_sumLastDigit(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: 290

Copyright Nick Parlante 2017 - privacy