I am having a switch case, in which should trigger on a value.. The idea was that when the double lies in between a certain range, a certain case should be executed.. It looks like that switch only takes int as input..
How can i do this??
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
for(int i = 0 ; i < 240; i++)
{
double t = t + i*dt;
switch(t)
case t1 < t <= t2:
break;
case t2 < t <= t3:
break;
case t3 < t <= t4:
break;
case t4 < t <= t5:
break;
}