subject
Mathematics, 04.05.2021 06:30 seasmarie75

Problem: Write a method that will sum all digits of a number and replace the number with its digit sum. Data: A list containing 0 or more values. The list will not point at null. All numbers will be positive.

Output: All numbers will be replaced by their digit sum.

Help: The method for this problem does not return nor print anything. Yoiu must change the values in the list that was passed in.

Starting List
1, 212, 333, 49
99, 453
213

Ending List
1, 5, 9, 13
18, 12
6

I need this in java with arraylists.

ansver
Answers: 3

Other questions on the subject: Mathematics

image
Mathematics, 20.06.2019 18:04, jamilecalderonpalaci
Given that (x-3) is a factor of f(x)=x^3+ax^2-x-6, find a and hence the number of real roots or the equation f(x)=0
Answers: 3
image
Mathematics, 21.06.2019 17:20, ponylover9655
Read the situations in the table below. then drag a graph and equation to represent each situation. indicate whether each of the relationships is proportional or non-proportional. edit : i got the right answer its attached
Answers: 2
image
Mathematics, 21.06.2019 17:30, jruiz33106
1mile equals approximately 1.6 kilometers. which best approximates the number of miles in 6 kilometers?
Answers: 1
image
Mathematics, 21.06.2019 18:20, ellenharley7
What value of x is in the solution set of 4x - 12 s 16 + 8x? -10 -9 -8 -7
Answers: 1
You know the right answer?
Problem: Write a method that will sum all digits of a number and replace the number with its digit s...

Questions in other subjects: