请问一下我的这道程序有什么问题啊?
下面这个程序是为了输出:the factorial of 2 is 1 * 2 = 2, the factorial of 3 is 1 * 2 * 3 = 6,
the factorial of 4 is 1 * 2 * 3 * 4 = 24,
.......
#include<stdio.h>
void main()
{
int a[8];
int i,j;
a[0]=1;
for(i=1;i<=7;++i)
a[i]=a[i-1]*i;
for(i=1;i<=7;++i)
printf("The factorial of %d is %d\n",i,a[i]);
for(i=1;i<=7;i++)
{
printf("\nThe factorial of %d is ",i);
for(j=1;j<=i;j++)
{
while(i==1)
{
printf("");
}
while(j<i)
{
printf("%d * ",j);
}
while(j>=i)
{
printf("%d = ",j);
}
}
printf("%d\n",a[i]);
}
}