Everything it's in C because the course is done with C programming language. But you are right, for some problems such as counting numbers or sequences of numbers, better ommit the #include int main() thing and leave the essential algorithm itself.
I've seen a different method of teaching which is to use Java and object orientation programming right from the beginning, but that wasn't my case.
By the way, I'm writing some annotations (in portuguese version first), because there are things that need to be improved. For ex: I'm thinking about adding a chapter with ~20 example problems with commented code (make the union of two arrays, calculate Taylor Series for cos function, do the sum of a sequence of factorials, cash machine program to count notes, etc).