#include #include using namespace std; void factorial(); int main() { factorial(); return EXIT_SUCCESS; } //Output the product 1 * 2 * 3 * 4 //This product is called the "factorial of 4". void factorial() { int f {1}; //Can mention this variable only within the {} of factorial. for (int i {1}; i <= 4; ++i) { f *= i; //means f = f * i; } //Old news: the i has already been destroyed by the time we arrive here. cout << "The factorial of 4 is " << f << ".\n"; } //New news: the f in factorial is destroyed at this curly brace.