Anyone know how to create triangular array in C? I tried to use malloc, firstly for first "dimension" and then i used for loop to create second dimension with malloc, but my leading teacher said that this isn't correct.

```
 int **price_of_diamond, i, j;
price_of_diamond=malloc((count*sizeof(int)));
for(i=0;i<conut;++i){
    price_of_diamond[i]=malloc((i-1)*sizeof(int));
}

```

Tip for the task was to "create triangular array(getting shorter arrays)".
Program worked in theory but teacher said that this is wrong implementation, but didn't said what was bad