Answer to Question #4225 in Visual Basic for Phillip

Question #4225
Can IF statements replace SELECT statements?
1
Expert's answer
2011-09-18T16:30:06-0400
C++ code
& example shows how to do it.
IF statements:

if(x==1){
...
}else if(x==2){
...
}else{
...
}

SELECT statements:

switch(x){
case 1:
...
break;

case 2:
...
break;

default:
...
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS