// This program demonstrates a simple recursive function. #include using namespace std; // Function prototype void message(int); int main() { message(5); return 0; } //*********************************************************** // Definition of function Message. If the value in times is * // greater than 0, the message is displayed and the * // function is recursively called with the argument * // times - 1. * //*********************************************************** void message(int times) { if (times > 0) { cout << "This is a recursive function.\n"; message(times - 1); } }