Make a program to read an array A of the vector type with 15 elements. Construct a matrix B of same type, each element of matrix B being the factorial of the corresponding element of matrix A. Display the matrices A and B.
I tried to make people but something is wrong and I can not see what it is, if someone can point the error I thank you and it's already worth the help ...
int matriza[5], matrizb[5], matrizc[5], indice, cont = 0, soma = 0;
for(indice = 1; indice <= 5; indice++)
{
printf("\n digite um valor: ");
scanf("%d",&matriza[indice]);
}
cont = matriza[indice];
for(soma = 1; cont >= 1; cont = cont - 1)
{
soma = soma * cont;
matrizb[indice] = soma;
}
for(indice = 1; indice <= 5; indice++)
{
printf("\n O valor do vetor B e: %d \n", matrizb[indice]);
}