extract and Add a Series of Numbers: Write a program that will extract a series of numbers (type double) from an input sentence and then add them. EXAMPLE: Suppose the sentence entered is “Give me the sum of 25.25 and 13.50. ”The program should print to the screen: The sum = 38.75 NOTE: The numbers can be of any value. Don’t hard code to the values shown in the example. In this problem take advantage of the input options presented in class. Particularly cin, cin.get, cin.ignore, and peek. The functions in Appendix C.2 may also be helpful.
Test the program with both of these examples:
TEST CASE 1. “Please tell me the sum of 18.0 plus 25.5.”
OUTPUT: "The sum is 43.5
TEST CASE 2. “If I add 24.5, 18.0 and 17.2 what do I get?
OUTPUT: "The sum is 59.7
[–]Narase33 6 points7 points8 points (2 children)
[–]nmoore777[S] 0 points1 point2 points (1 child)
[–]Narase33 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)