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.
@@coding::1@@
Recommended Programs