Syntax in a code snippet you have provided is wrong. I do not know if it was intentional, but your code snippet will not even compile.
If this was intended as a pseudo-code, you should indicate this.
Since you have already revealed a code it should be written as something similar to this:
Code:
 	//start and end are delivered as function srguments.  
	int total = 0;

	for(int iIndx = start; iIndx <= end; ++iIndx)
	{
		int total += iIndx; 
	}