7 kyu
Summing a number's digits
17,256 of 40,873mweiss
Description:
Write a function which takes a number as input and returns the sum of the absolute value of each of the number's decimal digits.
For example: (Input --> Output)
10 --> 1
99 --> 18
-32 --> 5
Let's assume that all numbers in the input will be integer values.
Fundamentals
Similar Kata:
Stats:
Created | Feb 6, 2014 |
Published | Feb 6, 2014 |
Warriors Trained | 59045 |
Total Skips | 5859 |
Total Code Submissions | 127959 |
Total Times Completed | 40873 |
JavaScript Completions | 17256 |
Ruby Completions | 2335 |
Python Completions | 15845 |
CoffeeScript Completions | 170 |
C# Completions | 2112 |
Groovy Completions | 167 |
C Completions | 1499 |
Julia Completions | 99 |
TypeScript Completions | 1548 |
Elixir Completions | 332 |
Prolog Completions | 66 |
Scala Completions | 49 |
R Completions | 87 |
Lua Completions | 54 |
PHP Completions | 78 |
Java Completions | 250 |
Total Stars | 341 |
% of votes with a positive feedback rating | 93% of 3499 |
Total "Very Satisfied" Votes | 3025 |
Total "Somewhat Satisfied" Votes | 434 |
Total "Not Satisfied" Votes | 40 |