#include /* The previous version almost worked properly, but it never stopped. The reason is that this void do_it_this_many_times(const int N) { do_it_once(); do_it_this_many_times(N - 1); } isn't always the correct way to do something N times. How do you do something zero? Do you do it once, then do it another -1 times? No, you just do nothing at all. */ void do_it_once() { print("I will not be late for class"); new_line(); } void do_it_this_many_times(int N) { if (N > 0) { do_it_once(); do_it_this_many_times(N - 1); } } void main() { do_it_this_many_times(100); } /* This version would be just as good. Some may even prefer it void do_it_this_many_times(const int N) { do_it_once(); if (N > 1) do_it_this_many_times(N - 1); } or how about void do_it_this_many_times(const int N) { do_it_once(); const int how_many_more_times = N - 1; if (how_many_more_times != 0) do_it_this_many_times(how_many_more_times); } */