The fact function should be int fact(int a). You're passing a simple integer. Make the loop for (i=1;i<=a;i++)

In main, you must allocate space for the array. If you expect the user to input a 10,...