Question: C++ question Here's the problem. Write the function sumNums (), which, when given a string, returns the sum of the numbers appearing in the string,

 C++ question Here's the problem. Write the function sumNums (), which,

C++ question

Here's the problem. Write the function sumNums (), which, when given a string, returns the sum of the numbers appearing in the string, ignoring all other characters. A number is one, or more digit characters in a row. Here are some examples: + sumNums ("abc123xyz") -123 sumNums ("aa11b33")-44 + sumNums ("7 11")+18

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!