Writing​ ​a​ ​program​ ​that​ ​lets​ ​the​ ​user​ ​throw​ ​five​ ​dice​ ​and​ ​to display​ ​the​ ​result​ ​“graphically”​ ​on​ ​the​ ​screen.  

 The​ ​program​ ​should​ ​start​ ​by​ ​simulating​ ​five​ ​die​ ​throws​ ​by​ ​filling​ ​an​ ​array​ ​with​ ​5​ ​numbers between​ ​1​ ​and​ ​5.​ ​A function ​should​ ​then​ ​“draw”​ ​the​ ​result​ ​by​ ​displaying​ ​characters​ ​on​ ​the​ ​screen and a function who calculate the sum.  

I get a error message the first function, it says I have not defined the matrix, which I defined in the "if".

```
#include <stdio.h> 
int sumOfDie(int inputArray[], int arraySize); 
int drawDie(int inputArray[], int arraySize)
{
int i, row, column=0;

for (i=0; i<arraySize; i++)  //determine the graphic number from the random number
{
    if (inputArray[i]==1)
    {
        char matrix [3][4] = {{"   "},{" * "},{"   "}};
    }
    if (inputArray[i]==2)
    {
        char matrix [3][4] = {{"*  "},{"   "},{"  *"}};
    }
    if (inputArray[i]==3)
    {
        char matrix [3][4] = {{"*  "},{" * "},{"  *"}};
    }
    if (inputArray[i]==4)
    {
        char matrix [3][4] = {{"* *"},{"   "},{"* *"}};
    }
    if (inputArray[i]==5)
    {
        char matrix [3][4] = {{"* *"},{" * "},{"* *"}};
    }

    for (row=0; row<3; row++) //Print out the matrix
    {
        for(column=0; column<4; column++)
        {
            printf("%c     ", matrix[row][column]);
        }
        printf("\n");
    }
}

}
int sumOfDie(int inputArray[], int arraySize) 
{
    int i, sum=0;
    for (i=0; i<arraySize; i++)
    {
        sum=sum+inputArray[i];
    }
    return sum;
}

int main(void)
{
    int i;
    int inputArry[5];
    srand(time(NULL)); 

for(i=0; i<5; i++)
{
    inputArry[i] = rand()%5+1;
}

for (i=0; i<5; i++)
{
    printf("Number:%d\n", inputArry[i]);
}

drawDie(inputArry, 5);

sum = sumOfDie(inputArray,5)
printf("The sum of %i + %i + %i + %i + %i = %i", inputArry[0], inputArry[1], inputArry[2], inputArry[3], inputArry[4], sum);

return 0;
}

```