The program should read in a text string containing a list of numbers separated by + or - and output the sum. The program should also tell how many positive numbers and how many negative (subtracted) numbers there are.
The input cannot contain any other operators than + and -. Spaces are allowed.
The program should be organized so that main reads the input as a single text string and outputs the results. The interpretation of the text string and calculation of results should be in a separate sub-function. Do not use global variables.
Tip: the function atof can read a number from a text string. Anything that comes after the number is ignored by atof.
I have asked several people about this but none of them could how to do it . especially with atof;