Javatpoint Logo

91-9990449935

 0120-4256464

Javatpoint Logo

C++ switch

The C++ switch statement executes one statement from multiple conditions. It is like if-else-if ladder statement in C++.

Cpp Switch 1

C++ Switch Example

Output:

Enter a number:
10
It is 10

Output:

Enter a number:
55
Not 10, 20 or 30
Next TopicC++ For Loop




Latest 4 Tutorials on JavaTpoint