answersLogoWhite

0


Best Answer

switch(ch)

{

case '+':

....cout <<"arithmetic operator";

....break; //<===break is a must

/// <====================other cases

.

.

default: // <=======else

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write an equivalence of switch statement and if statement?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is an equivalence statement a true equation?

Not necessarily.


How many conversion factors can be created from one equivalence statement?

Two conversion factors can be made from one equivalence statement. But there may be up to 4 or 5 (depends).


Is the converse of the statement If it is my birthday then it is September?

There is no second statement whose equivalence needs to be checked.


Can you write switch statement with in while loop?

Yes. The same goes for for-loop and do-while-loop.


Can a continue statement be used in a switch statement?

If you have a loop in your switch statement or around your switch statement, you can use the continue statement in that. You cannot use a continue statement outside of a loop (do, for, or while).


What is a geometry if then statement?

This type of geometric qstn is related to the section of equivalence or Implification For Ex. Write this statement in an if...then way. x=2 implies x is even Answer. if x=2 then x is even. All you have to do is to cancel the imply (sign) and add in the wrd then.


Is the inverse of the statement If I like carrots then I like vegetablesAsk us anything?

There is no second statement whose equivalence needs to be checked.


What is the difference between 'switch' statement and 'if' statement?

we can use switch statement in multiple time but in if statement we can not use multiple time


What is the deffernce of the switch statement and the if statement in c plus plus?

If statement is single selection statement,whereas the switch statement is multiple selective.


What does default mean in switch statement?

Default clause in switch statement used to indicate that the desired option is not available with the switch case statement. it is similar to else statement of if statement which is used when the condition does not satisfy.


How does write statement differ from writeln statement?

I think you mean written statement. What you are asking about write statement you are confusing with written statement, the same with write in statement. A written statement is simply putting your words, or your version of events in writing.


What is output if we don't write break statement in switch-case in c sharp?

This question cannot be generally answered, the output depends on the actual program.