27 lines
525 B
TeX
27 lines
525 B
TeX
|
\begin{frame}[containsverbatim]
|
||
|
\frametitle{\secname}
|
||
|
\framesubtitle{\subsecname~III}
|
||
|
|
||
|
{\footnotesize\begin{exampleblock}{Conversion des if-else if-else en switch}
|
||
|
\begin{verbatim}
|
||
|
void testVal(int a) {
|
||
|
switch(a) {
|
||
|
case 0:
|
||
|
//instructions 1
|
||
|
break;
|
||
|
case 1:
|
||
|
//instructions 2
|
||
|
break;
|
||
|
... // signifie une ellipse dans l'exemple
|
||
|
case 19:
|
||
|
//instructions 20
|
||
|
break;
|
||
|
default:
|
||
|
//instructions 21
|
||
|
break;
|
||
|
}
|
||
|
}\end{verbatim}
|
||
|
\end{exampleblock}}
|
||
|
\end{frame}
|
||
|
|