---
###### tags: `C++`
---
# Control
## If Single Selection

### Usage
```C++=
if (condition)
{
Starement...
}
```
## If Else Double Selection

```C++=
if (condition)
{
Starement...
}
else
{
Starement...
}
```
## Condition Operation

### Eg 1
```c++=
int a=0
cout<<a=1 ? "Yes" : "No";
```
> No
## Multiple Selection
### Else If
```c++=
if (condition1)
{
Starement...
}
else if (condition2)
{
Starement...
}
else
{
Starement...
}
```
#### In C++ it will be seen that...
```c++=
if (condition1)
{
Starement...
}
else
{
if (condition2)
{
Starement...
}
else
{
Starement...
}
}
```
>However, we favor to use former
### Switch Case
```C++=
switch(various) {
case condition:
Starement...
break;
case condition:
Starement...
break;
default:
Starement...
break;
}
```
> if we don't use break,it will not break out
> Instead, it will keep doing those instruction