I am having problems trying to figure out exactly what is going wrong with my code. I am trying to create a factorial program using an array. I have tried, unsuccessfully, various ways to make it work but I can not figure it out. Any assistance would be appreciated.
#include <stdio.h>
int main(void)
{
int iFac[10] = {0};
int iTotal = 0;
int iCount = 0;
for (iCount = 0; iCount < 10; iCount++)
iFac[iCount] = iCount;
iTotal = (iCount * (iCount - 1)) * iCount;
for (iCount = 0; iCount <= 10; iCount++)
printf("\nThe value of the factorial is %d\n", iTotal);
return 0;
}