<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Division]]></title><description><![CDATA[<p>Ich habe eine Frage zu einer Division. Wenn ich bei einer Division keinen Rest habe, dann soll er mir eine 0 ausgeben, wenn ich einen Rest habe, dann soll er eine 1 ausgeben.</p>
<p>bsp: 10/2 = 5 --&gt; 0<br />
5/2 --&gt; 1</p>
<p>cu<br />
shm</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/148583/division</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Sep 2026 21:48:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/148583.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 28 May 2006 13:54:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Division on Sun, 28 May 2006 13:54:29 GMT]]></title><description><![CDATA[<p>Ich habe eine Frage zu einer Division. Wenn ich bei einer Division keinen Rest habe, dann soll er mir eine 0 ausgeben, wenn ich einen Rest habe, dann soll er eine 1 ausgeben.</p>
<p>bsp: 10/2 = 5 --&gt; 0<br />
5/2 --&gt; 1</p>
<p>cu<br />
shm</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066673</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066673</guid><dc:creator><![CDATA[shm]]></dc:creator><pubDate>Sun, 28 May 2006 13:54:29 GMT</pubDate></item><item><title><![CDATA[Reply to Division on Sun, 28 May 2006 13:57:19 GMT]]></title><description><![CDATA[<p>Dafür gibts den modulo Operator:<br />
int i = 5%2; // i == 1<br />
int j = 10%2; // j == 0</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1066676</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066676</guid><dc:creator><![CDATA[KPC]]></dc:creator><pubDate>Sun, 28 May 2006 13:57:19 GMT</pubDate></item><item><title><![CDATA[Reply to Division on Sun, 28 May 2006 14:00:46 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

bool hatRest(int a, int d)
{
  return bool(a%d);
}

int main()
{
  cout &lt;&lt; &quot;5 / 2 :\t&quot; &lt;&lt; hatRest(5, 2) &lt;&lt; endl;
  cout &lt;&lt; &quot;4 / 2 :\t&quot; &lt;&lt; hatRest(4, 2) &lt;&lt; endl;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1066679</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1066679</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 28 May 2006 14:00:46 GMT</pubDate></item></channel></rss>