Hey guys, been to the forum a couple times but never posted. Thought I'd give it a try.
So my problem is basically this.
I'm to create a program which reads a line in this form
"-6 1 2 3 6"
"-10 1 2 5 10"
-6 being a perfect number, and 1 2 3 6 being its factors.
if the numbers on the line (except the last one) are equal to the first number it is perfect.
I'm having trouble parsing the 1 2 and 3 out of the line. 6 can be ignored because only the factors not equal to the number are important. I can successfully parse the -6 using sscanf but Im stumped as to how to go about getting the 1 2 and 3 out of the line.
Any ideas?