Quantcast
Channel: switch / case
Browsing latest articles
Browse All 4 View Live

switch / case

I agree with the others here, switch/case is likely the wrong choice (since so many cases fall into only one of two choices). If you have more granularity, then switch/case might be better. The...

View Article



switch / case

A case statement can only be an exact match, and you cannot use logical conditions.  You are correct in your assumption that you would have to use case 0: case 1: etc. etc.  You have to use an if/else...

View Article

switch / case

Hi, AFAIK, you cannot. You would be better off using if-else in this case Code Snippetif (i>=1 && i<=999){// my statements}elseif (i>=10000) {// another statement}   HTH,Suprotim Agarwal 

View Article

switch / case

 I want use a switch Like a case 1 to 999 run My Statements and case 999 to 10000 run another Statmentsone sulotion for this code : Code Snippetswitch (s){case 0:case 1:case2:printf(I handle case 0, 1,...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images