Exclude scores when flag is set
I agree with forsvarir's answer, that you should lose the continue by inverting the condition.  But you can do one better than that: lose the loop!

var scores = students.Select(student =&gt; GetScore(student));
int count = scores.Count(score =&gt; !excludeZeros || score != 0);
int total = scores.Sum();


Done. No loop needed. 

Or equivalently:

var scores = from student in students
             let score = GetScore(student)
             where !excludeZeros || score != 0
             select score;
int count = scores.Count();
int total = scores.Sum();


You know what is really nice about doing it this way? First, the code looks like what it means; it's closer to the "business domain" of the code. Second, it is super easy to extract more statistics:

int maximum = scores.Max();
int average = scores.Average();
var sorted = scores.OrderBy(x=&gt;x);
var bottomTen = sorted.Take(10);


and so on.