0

can i use condition like while or if in switch case ?

int a case 42: can i use (a<42 ) as case condition n

26th Jan 2018, 8:17 AM
Rushikesh
Rushikesh - avatar
2 Answers
+ 22
can't work as while() //bcz while loops can work for more then 1 time & switch only once but u can make it work as if statement or if else statements by proper use of break statement
26th Jan 2018, 8:47 AM
Gaurav Agrawal
Gaurav Agrawal - avatar