7 kyu
Summing a number's digits
17,407 of 41,405mweiss
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 | 59708 |
Total Skips | 5886 |
Total Code Submissions | 129196 |
Total Times Completed | 41405 |
JavaScript Completions | 17407 |
Ruby Completions | 2342 |
Python Completions | 16066 |
CoffeeScript Completions | 170 |
C# Completions | 2131 |
Groovy Completions | 168 |
C Completions | 1510 |
Julia Completions | 101 |
TypeScript Completions | 1577 |
Elixir Completions | 334 |
Prolog Completions | 68 |
Scala Completions | 50 |
R Completions | 92 |
Lua Completions | 57 |
PHP Completions | 105 |
Java Completions | 322 |
Total Stars | 343 |
% of votes with a positive feedback rating | 93% of 3518 |
Total "Very Satisfied" Votes | 3043 |
Total "Somewhat Satisfied" Votes | 435 |
Total "Not Satisfied" Votes | 40 |