- Calculate the factorial for values 1-20 and display the results Display the results in two columns. Left column 1 – 10 and the right column 11 – 20.
Here is my code, can someone help me.
Code:void FactorialNumberFor1To20(int intIndex) { int intFactorial = 0; int intArraySize[19]; intFactorial = intArraySize[19]; for (intIndex = intArraySize[19]; intIndex > 1; intIndex -= 1) { intFactorial = intFactorial * (intIndex - 1); intArraySize[intIndex] = intFactorial; } cout << intArraySize[intIndex] << setw(40) << " " << intArraySize[intIndex + 10]; }