I'm trying to write a method that accepts a string of names followed by integers, and the names alternate between boys and girls.
For examples: "Mark 41 Jennifer 22 Daniel 49 Jessica 67 Joshua 87"
The output should be:
3 boys, 2 girls
boys sum = 177
girls sum = 89
I'm having trouble just figuring out first of all how to alternate, and then how to get past the names to the integers.
Any help is appreciated, thank you!