Whats up guys. One of my questions on homework is as follows:

Write a value-returning function that contains a for loop that will find the sum of the integers from start to finish (start and finish are int variables passed to the function). (Example if start is 9 and finish is 12, then the function would return the sum of 9 + 10 + 11 + 12)

I don't see how this is possible using a for loop. Don't for loops only deal with counts and can't the testExpression only be an inequlaity? Ex. for(i=1, i<=10, i++)

Is it possible to do this with variables (start and finish) like the teacher said or should I just do a while loop? I'm a confused noob.

Thanks