Given a string containing both numbers and alphabets, the task is to find the sum of all numbers present in the string.

Input:
abc45def5ghi32
Output:
82
Explanation:
The numbers 45, 5 and 32 are present in the string.
Sum = 45 + 5 + 32 = 82.
Click here to learn more about FACE Prep PRO@@coding::1@@
Recommended Programs