CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of calculator
C++
from math import *
 
def sumOfDigit(n):
    if n<10: return n
    sum = 0
    if n >0:
        sum += n%10
        n /= 10
    return sum
by Pella86   December 23, 2011 @ 5:10pm
141 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate