/ ************************************************** **************** * * Squains from n (n <100) * // * to store the result in array A group of each of the arrays Saving a number, a [0] stores the number of bits of current results * // ****************************************** *************************************** /
#include
B = (int *) malloc (sizeof (int) * (m 1)); if (! b) {printf ("Malloc Memory Error! / N); exit (0);} for (i = 1; i <= m; i ) {b [i] = a [i];
For (j = 1; j / * Output result * / void printResult (int * a, int N) {INT i; printf ("% 4d! =", N); for (i = a [0]; i> 0; I -) { Printf ("% d", a [i]);} printf ("/ n");} INT main () {Int a [max]; int N, k; Printf ("please input the number: / n"); scanf ("% d", & n); a [0] = 1; a [1] = 1; PrintResult (a, 1); For (k = 2; k <= N; k ) {Factorial (A, K); PrintResult (A, K);} getCh (); return 0;}