Cody

# Problem 20. Summing digits

Solution 1028107

Submitted on 23 Oct 2016 by mohamed elbesealy
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
a = 1; b = 2; out = sumDigits(a); assert(isequal(out, b))

2   Pass
a = 10; b = 7; out = sumDigits(a); assert(isequal(out, b))

3   Pass
a = 16; b = 25; out = sumDigits(a); assert(isequal(out, b))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
{"ft_lang_label":"__label__en","ft_lang_prob":0.57986474,"math_prob":0.979519,"size":451,"snap":"2020-45-2020-50","text_gpt3_token_len":145,"char_repetition_ratio":0.13870247,"word_repetition_ratio":0.075,"special_character_ratio":0.36363637,"punctuation_ratio":0.15625,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96732247,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-26T22:08:05Z\",\"WARC-Record-ID\":\"<urn:uuid:336ea84a-4e4a-4c1d-a2ec-2fe6066f2cda>\",\"Content-Length\":\"79842\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:11f18554-fc5e-45d6-b0a8-39c59f731957>\",\"WARC-Concurrent-To\":\"<urn:uuid:7af3a100-7bdf-43f5-8189-132004a7c768>\",\"WARC-IP-Address\":\"184.24.72.83\",\"WARC-Target-URI\":\"https://in.mathworks.com/matlabcentral/cody/problems/20-summing-digits/solutions/1028107\",\"WARC-Payload-Digest\":\"sha1:DT4KJB42EHN2HKT3NSU5RDKIELY5CF7X\",\"WARC-Block-Digest\":\"sha1:2Z6VRLPJSBTUWXBNL6DUFJW2USE7SMUW\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141188947.19_warc_CC-MAIN-20201126200910-20201126230910-00562.warc.gz\"}"}