/* An example on the use of arrays : Factorial file: 6ex2.cpp FALL 1998 ___________________________________ Jacob Y. Kazakia jyk0 October 13, 1998 Example 1 of week 6 Recitation Instructor: J.Y.Kazakia Recitation Section 01 ___________________________________ Purpose: This program calculates the first 11 factorials ( 0!, 1!, 2!, ... 10!) and stores them in an array factor[10] */ #include #include void main() { // declare the variables of the main function int factor[11]; // This is an array of eleven entries named as: // factor[0], factor[1], factor[2], .......,factor[10]. int m = 0; factor[0] = 1; cout << " \n\n The factorials are: \n\n" ; cout << setw(5)<< m <<" !"<< setw(15)<>hold; } /* The output is : The factorials are: 0 ! 1 1 ! 1 2 ! 2 3 ! 6 4 ! 24 5 ! 120 6 ! 720 7 ! 5040 8 ! 40320 9 ! 362880 10 ! 3628800 DONE ! enter e (exit) to terminate the program.... */