1. [ C++ ] switch .. case
We calculate the population density in people per 100km2.
test text
1. [ Java ] switch .. case
We calculate the population density in people per 100km2.
- Notice that each case requires the
break
- Notice that cases 2 and 3 have been combined.
- Notice that the default condition can be specified.
test text
1. [ C# ] switch .. case
We calculate the population density in people per 100km2.
- Notice that each case requires the
break
- Notice that cases 2 and 3 have been combined.
- Notice that the default condition can be specified.
The
break statement is required in the final case.
In some languages this is optional.
test text