Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

sum of digit of number c#

int result = 17463.ToString().Sum(c => Convert.ToInt32(c));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sum #digit #number
ADD COMMENT
Topic
Name
6+5 =