Hey guys i have a problem with my code here the problem is that

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.

Example:

input: .. 8.4 + 2.6 - 3.5 + 1

output: result = 8.5, positive numbers: 3, negative numbers: 1.

I used strings in it and used "atof" to use numbers in strings too but i dont know how to calculate the result. cos the user has to input where he wants the plus and minus should be. Please anyhelp would be great.