Error: array bound is not an integer constant before ']' token

Hello,

I have defined below parameters and I get "array bound" at Line 4. If I change sample with a constant number the problem is solved but this is not what I want. I want to be able to generate/calculate sample by the software not me inputting the outcome of the calculation. Any workaround to solve this issue? I tried float V_in[(int) sample] and some other tricks but none of them worked:(

Thanks,

Line1: double T=0.1;
Line2: int des_freq=200;
Line4: int sample =1000/(des_freq*T);

Line4: float V_in[sample];

It's illegal. You can't declare array size using a double.
What would

int numbers[2.5]

mean?

This works:

const double T=0.1;
const int des_freq=200;
const int sample =1000/(des_freq*T);
float V_in[sample];