maio
[h2N7SspZmY.git] / data / cache / 1 / 1fa53831cf2fcafc48af02864d653717.code
blobac51d81df1be0cba5da9f1f56d36121c21eedf0f
1 <span class="kw4">int</span> ackermann<span class="br0">&#40;</span><span class="kw4">int</span> m<span class="sy0">,</span> <span class="kw4">int</span> n<span class="br0">&#41;</span>
2 <span class="br0">&#123;</span>
3         <span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span>m<span class="br0">&#41;</span> <span class="kw1">return</span> n <span class="sy0">+</span> <span class="nu0">1</span><span class="sy0">;</span>
4         <span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span>n<span class="br0">&#41;</span> <span class="kw1">return</span> ackermann<span class="br0">&#40;</span>m <span class="sy0">-</span> 1<span class="sy0">,</span> 1<span class="br0">&#41;</span><span class="sy0">;</span>
5         <span class="kw1">return</span> ackermann<span class="br0">&#40;</span>m <span class="sy0">-</span> 1<span class="sy0">,</span> ackermann<span class="br0">&#40;</span>m<span class="sy0">,</span> n <span class="sy0">-</span> 1<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
6 <span class="br0">&#125;</span>