0

In switch statements in cases if I had to give a expression like a <-1in case-1 then it show error so how can I make cases for such opertaions

in switch cases when I make different cases we pu generally value 1,2 etc but if I had to make cases like -1<a<1 Case-1 ,1<a<2 case -2 then how will I do it shows error

24th Sep 2016, 5:34 PM
VAIBHAV JAIN
1 Antwort
+ 3
use if ....else if....else... you cant use switch in such cases.
24th Sep 2016, 6:21 PM
Zaman
Zaman - avatar