Cody

Problem 57. Summing Digits within Text

Created by Cody Team in Cody Challenge

Given a string with text and digits, add all the numbers together.

Examples:

 Input str = '4 and 20 blackbirds baked in a pie'
 Output total is 24
 Input str = '2 4 6 8 who do we appreciate?'
 Output total is 20

Solution Stats

46.94% Correct | 53.06% Incorrect
Last solution submitted on Dec 12, 2018

Problem Comments

Solution Comments

Recent Solvers889

Tags

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!