#include /* Notice how all the hundred functions were pretty much identical void do_it_eight_times() { do_it_once(); do_it_seven_times(); } void do_it_nine_times() { do_it_once(); do_it_eight_times(); } void do_it_ten_times() { do_it_once(); do_it_nine_times(); } They could be replaced by one generic version void do_it_N_times() { do_it_once(); do_it_N-1_times(); } Except C++ doesn't work like that. We need to make N into an input to the function. Or to use the proper word, parameter. */ void do_it_once() { print("I will not be late for class"); new_line(); } void do_it_this_many_times(int N) { do_it_once(); do_it_this_many_times(N - 1); } void main() { do_it_this_many_times(100); }