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

 

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

Write a method that returns the sum of the one's place digits of the two input parameters. For example, if the input parameters are 53257 and 98241, you would return 8 since 7+1=8 (taking the one's digit from each number and adding them). As a precondition you may assume that both input parameters are positive.


nov18_2016_APSLHL_sumOnesPlace(12452, 214) → 6
nov18_2016_APSLHL_sumOnesPlace(4289, 421) → 10
nov18_2016_APSLHL_sumOnesPlace(482, 5432) → 4

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

public int nov18_2016_APSLHL_sumOnesPlace(int num1, int num2) { }

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: 220

Copyright Nick Parlante 2017 - privacy