#Algorithm sum of digits

11 messages ยท Page 1 of 1 (latest)

stiff magnetBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

old frost
#

the while v[m] part in the middle can be done much better

#

if you pass in a number <= 0 the program will try to access v[-1], which is bad for obvious reasons

#

it will also fail for 88

#

and it is quite inefficient

gusty harness
old frost
#

Try it ๐Ÿ™‚

stiff magnetBOT
#

@gusty harness Has your question been resolved? If so, run !solved :)

gusty harness
old frost
#

does it return true?