backup de julho
[h2N7SspZmY.git] / data / cache / 0 / 00d2a9dcb66d83121e6889232d2b2ca3.code
blobb2666d0985b73955847ace739025575a0df21b21
1 <span class="co2">#include &lt;iostream&gt;</span>
2 using namespace std<span class="sy0">;</span>
3 &nbsp;
4 <span class="kw4">int</span> f<span class="br0">&#40;</span><span class="kw4">int</span> x<span class="br0">&#41;</span>
5 <span class="br0">&#123;</span>
6         <span class="kw1">if</span><span class="br0">&#40;</span>x <span class="sy0">&lt;</span> 0<span class="br0">&#41;</span> throw <span class="nu0">0</span><span class="sy0">;</span>
7         <span class="kw1">return</span> <span class="nu0">1</span><span class="sy0">;</span>
8 <span class="br0">&#125;</span>
9 &nbsp;
10 <span class="kw4">int</span> main<span class="br0">&#40;</span><span class="br0">&#41;</span>
11 <span class="br0">&#123;</span>
12         try <span class="br0">&#123;</span>
13                 <a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span class="kw3">cout</span></a> <span class="sy0">&lt;&lt;</span> f<span class="br0">&#40;</span>0<span class="br0">&#41;</span> <span class="sy0">&lt;&lt;</span> endl<span class="sy0">;</span>
14                 <a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span class="kw3">cout</span></a> <span class="sy0">&lt;&lt;</span> f<span class="br0">&#40;</span><span class="sy0">-</span>1<span class="br0">&#41;</span> <span class="sy0">&lt;&lt;</span> endl<span class="sy0">;</span>
15         <span class="br0">&#125;</span> catch<span class="br0">&#40;</span><span class="kw4">int</span> e<span class="br0">&#41;</span> <span class="br0">&#123;</span>
16                 <a href="http://www.opengroup.org/onlinepubs/009695399/functions/cout.html"><span class="kw3">cout</span></a> <span class="sy0">&lt;&lt;</span> <span class="st0">&quot;catch &quot;</span> <span class="sy0">&lt;&lt;</span> e <span class="sy0">&lt;&lt;</span> endl<span class="sy0">;</span>
17         <span class="br0">&#125;</span>
18 <span class="br0">&#125;</span>