<?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[bedinung zahl=ungerade?]]></title><description><![CDATA[<p>wie kann ich eine bedingung wie &quot;zahl=ungerade&quot; formulieren? geht das überhaupt?</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/196298/bedinung-zahl-ungerade</link><generator>RSS for Node</generator><lastBuildDate>Wed, 30 Sep 2026 10:07:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/196298.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 27 Oct 2007 21:42:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 21:42:17 GMT]]></title><description><![CDATA[<p>wie kann ich eine bedingung wie &quot;zahl=ungerade&quot; formulieren? geht das überhaupt?</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393349</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393349</guid><dc:creator><![CDATA[athan]]></dc:creator><pubDate>Sat, 27 Oct 2007 21:42:17 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 21:46:06 GMT]]></title><description><![CDATA[<pre><code>if (x &amp; 1)
{
  // odd
}
</code></pre>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393350</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393350</guid><dc:creator><![CDATA[Bouncer]]></dc:creator><pubDate>Sat, 27 Oct 2007 21:46:06 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 21:50:08 GMT]]></title><description><![CDATA[<p>mhm kannste das erklären <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /><br />
was bedeutet denn dann zb zahl=gerade?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393353</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393353</guid><dc:creator><![CDATA[athan]]></dc:creator><pubDate>Sat, 27 Oct 2007 21:50:08 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 21:52:45 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">if(zahl%2 == 0)
{
     //Ohne Rest durch 2 teilbar (rest 0)
}
else if(zahl%2 == 1)
{
     //Nicht ohne Rest durch 2 teilbar (rest 1)
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1393354</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393354</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Sat, 27 Oct 2007 21:52:45 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 21:52:35 GMT]]></title><description><![CDATA[<p>Bouncer schrieb:</p>
<blockquote>
<pre><code>if (x &amp; 1)
{
  // odd
}
</code></pre>
</blockquote>
<p>Es wird geprueft, ob das niederwertigste Bit (Wertigkeit 1) gesetzt ist, ist das der Fall muss die Zahl ungerade sein.<br />
Zahl gerade waere dann x &amp; 1 == 0 (denn oben steht im Prinzip x &amp; 1 != 0).</p>
<p>Gruss,<br />
DeSoVoDaMu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393358</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393358</guid><dc:creator><![CDATA[DeSoVoDaMu]]></dc:creator><pubDate>Sat, 27 Oct 2007 21:52:35 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 21:57:28 GMT]]></title><description><![CDATA[<p>athan schrieb:</p>
<blockquote>
<p>mhm kannste das erklären <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /><br />
was bedeutet denn dann zb zahl=gerade?</p>
</blockquote>
<p>das wäre der 'else' zweig.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393361</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393361</guid><dc:creator><![CDATA[Bouncer]]></dc:creator><pubDate>Sat, 27 Oct 2007 21:57:28 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 22:00:58 GMT]]></title><description><![CDATA[<p>The-Kenny schrieb:</p>
<blockquote>
<pre><code class="language-cpp">if(zahl%2 == 0)
{
     //Ohne Rest durch 2 teilbar (rest 0)
}
else if(zahl%2 == 1)
{
     //Nicht ohne Rest durch 2 teilbar (rest 1)
}
</code></pre>
</blockquote>
<p>du musst nicht 2 mal den rest ermitteln. zahl%2 ist entweder 0 oder 1 (false oder true) d.h. beim 'else' ist kein weiterer test nötig.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393363</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393363</guid><dc:creator><![CDATA[Bouncer]]></dc:creator><pubDate>Sat, 27 Oct 2007 22:00:58 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 22:02:18 GMT]]></title><description><![CDATA[<p>oha sry ich hab mei frage bissl falsch gestellt merk ich grad ^^<br />
will ne bedinung die so aussieht: &quot;zahl=<strong>ganze zahl</strong>&quot;<br />
kp voll vertan +g+</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393364</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393364</guid><dc:creator><![CDATA[athan]]></dc:creator><pubDate>Sat, 27 Oct 2007 22:02:18 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 22:10:27 GMT]]></title><description><![CDATA[<p>Bouncer schrieb:</p>
<blockquote>
<p>The-Kenny schrieb:</p>
<blockquote>
<pre><code class="language-cpp">if(zahl%2 == 0)
{
     //Ohne Rest durch 2 teilbar (rest 0)
}
else if(zahl%2 == 1)
{
     //Nicht ohne Rest durch 2 teilbar (rest 1)
}
</code></pre>
</blockquote>
<p>du musst nicht 2 mal den rest ermitteln. zahl%2 ist entweder 0 oder 1 (false oder true) d.h. beim 'else' ist kein weiterer test nötig.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
</blockquote>
<p>War nur als Beispiel gedacht, um zu zeigen, wie man auf ungerade Zahlen prüfen kann <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393372</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393372</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Sat, 27 Oct 2007 22:10:27 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 23:25:41 GMT]]></title><description><![CDATA[<p>Dann liegt deine Zahl vermutlich als Gleitkommazahl vor. Hier hilft floor weiter.</p>
<pre><code class="language-cpp">if (x - floor(x) &lt; epsilon)
{
    // x ist eine Ganzzahl
}
</code></pre>
<p>epsilon ist die gewünschte Genauigkeit. Als default kann man hier</p>
<pre><code class="language-cpp">#include &lt;climits&gt;
std::numeric_limits&lt;T&gt;::epsilon()
// bzw.
FLT_EPSILON
DBL_EPSILON
LDBL_EPSILON
</code></pre>
<p>verwenden. Je nach dem, welchen Typ deine Zahl hat.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393392</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393392</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Sat, 27 Oct 2007 23:25:41 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 23:16:46 GMT]]></title><description><![CDATA[<p>groovemaster schrieb:</p>
<blockquote>
<p>Dann liegt deine Zahl vermutlich als Gleitkommazahl vor.</p>
</blockquote>
<p>der OP fragte nach 'gerade' oder 'ungerade'. die unterscheidung gibts nicht bei reellen zahlen.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393396</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393396</guid><dc:creator><![CDATA[Bouncer]]></dc:creator><pubDate>Sat, 27 Oct 2007 23:16:46 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 23:22:43 GMT]]></title><description><![CDATA[<p>Du solltest <a href="http://www.c-plusplus.net/forum/viewtopic-var-p-is-1393364.html#1393364" rel="nofollow">lesen lernen</a>. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393398</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393398</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Sat, 27 Oct 2007 23:22:43 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 23:25:58 GMT]]></title><description><![CDATA[<p>groovemaster schrieb:</p>
<blockquote>
<p>Du solltest <a href="http://www.c-plusplus.net/forum/viewtopic-var-p-is-1393364.html#1393364" rel="nofollow">lesen lernen</a>. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>na, so ein schlingel aber auch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393399</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393399</guid><dc:creator><![CDATA[Bouncer]]></dc:creator><pubDate>Sat, 27 Oct 2007 23:25:58 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 23:41:54 GMT]]></title><description><![CDATA[<p>ja sorry ^^</p>
<p>also das is so, ich versuche ein programm zu schreiben, das mir alle primzahlen zwischen 0 und 100 ausgibt. soweit ich bis jetzt geschrieben habe müsste das eigentlich auch funzen, mein einziges problem ist eben, dass ich net weiss, wie ich dem pc klarmachen soll, dass eine bedinung nur dann erfüllt is, wenn eine bestimmte variable eine <strong>ganze zahl</strong> ist.</p>
<p>und ich weiss eben net wie ich sone bedingung formulieren soll. eigentlich sowas wie <strong>if (variable==ganze zahl)</strong> hab auch schon <strong>if (variable==integer)</strong> probiert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>mfg<br />
ps: sorry nochmal, is jetz alles durcheinabder hier +g+</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393409</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393409</guid><dc:creator><![CDATA[athan]]></dc:creator><pubDate>Sat, 27 Oct 2007 23:41:54 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sat, 27 Oct 2007 23:56:22 GMT]]></title><description><![CDATA[<p>athan schrieb:</p>
<blockquote>
<p>also das is so, ich versuche ein programm zu schreiben, das mir alle primzahlen zwischen 0 und 100 ausgibt.</p>
</blockquote>
<p>primzahlen sind doch sowieso nur 'natürliche zahlen'. von daher brauchste dich gar nicht mit floats herumzuärgern.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393413</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393413</guid><dc:creator><![CDATA[Bouncer]]></dc:creator><pubDate>Sat, 27 Oct 2007 23:56:22 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 03:39:43 GMT]]></title><description><![CDATA[<p>Äh.<br />
Wenn du z.B. prüfen willst ob das Ergebnis einer Division eine ganze Zahl ist, dann prüfst du das mit dem % Operator (der Ermittelt den Rest der Division):</p>
<pre><code class="language-cpp">if ((a % b) == 0)
{
    // &quot;a / b&quot; ist eine ganze zahl
}
</code></pre>
<p>Sonst wüsste ich nicht wo man zum Primzahlen Berechnen prüfen müsste ob irgendwas eine ganze Zahl ist, da man nur mit ganzen Zahlen arbeitet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393431</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393431</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Sun, 28 Oct 2007 03:39:43 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 09:01:47 GMT]]></title><description><![CDATA[<p>Wenn es ne voll stylische primzahlenberechnung sein soll, dann mach es so.</p>
<pre><code class="language-cpp">void prim(int a,int max) {
	int b=1;
	switch(a-max) {
		for(;b&lt;a;b++){
			switch(a%b){
				case 0:
					prim(++a,max);
					return;
				default:
					continue;
			}
			default:
				continue;
		}
		std::cout&lt;&lt;a&lt;&lt;std::endl;
		prim(++a,max);
		case 0:
			break;
	}
}

int main (void) {
	prim(2,100);
	return 0;
}
</code></pre>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393468</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393468</guid><dc:creator><![CDATA[MovieCoder]]></dc:creator><pubDate>Sun, 28 Oct 2007 09:01:47 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 09:14:11 GMT]]></title><description><![CDATA[<p>also ich hatte mir das so gedacht:</p>
<p>eine schleife wird solange ausgeführt, wie die zahl kleiner als 100 ist, und wird mit jedem durchlauf um 1 erhöht. d.h. schonmal, dass ich eine zahl nach der anderen auf primzahlen prüfen will. im schleifenkörper soll dann eine 2. zahl mit der ersten gleichgesetzt werden (sozusagen ein klon). dann kommt eine weitere schleife, die solange ausgeführt wird, wie zahl2 größer als 0 ist (die wird mit jedem durchlauf um 1 verringert). und dann wird zahl mit zahl2 (die ja immer kleiner wird) dividiert. und dann soll ein x immer dann um 1 erhöht werden, wenn das ergebnis eine <strong>ganze zahl</strong> war!<br />
und dann kann ich sagen, dass die zahl eine primzahl ist, wenn x=2 ist, weil es dann nur 2 zahlen gab, durch die man die zahl teilen konnte (nämlich 1 und sich selbst)!<br />
dann ist der erste schleifenkörper vorbei, die zahl wird um 1 erhöht und das ganze geht wieder von vorne los. das sieht dann so aus:</p>
<p>for (zahl=1; zahl&lt;100; ++zahl)<br />
{<br />
zahl2=zahl;<br />
while (zahl2&gt;0)<br />
{<br />
zahl/zahl2=erg;</p>
<p><em>if (erg == <strong>ganze zahl</strong>)</em><br />
x=x+1;</p>
<p>--zahl2;<br />
}<br />
if (x=2)<br />
printf (&quot;%d&quot;, zahl);<br />
printf (&quot;\n&quot;);<br />
}</p>
<p>und ich würde das gerne SO lösen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> dass ihr das mit links macht, is mir klar, aber ich weiss, dass mein programm funzen würde, wenn ich nur wüsste, wie man diese eine (kursive^^) bedingung da formuliert!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393470</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393470</guid><dc:creator><![CDATA[athan]]></dc:creator><pubDate>Sun, 28 Oct 2007 09:14:11 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 09:20:40 GMT]]></title><description><![CDATA[<p>steht doch schon da</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393471</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393471</guid><dc:creator><![CDATA[hustbär]]></dc:creator><pubDate>Sun, 28 Oct 2007 09:20:40 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 10:01:48 GMT]]></title><description><![CDATA[<p>hustbaer schrieb:</p>
<blockquote>
<p>(...)Sonst wüsste ich nicht wo man zum Primzahlen Berechnen prüfen müsste ob irgendwas eine ganze Zahl ist, da man nur mit ganzen Zahlen arbeitet.</p>
</blockquote>
<p>wollte nur erlären warum ich auf ganze zahlen prüfen will <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393484</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393484</guid><dc:creator><![CDATA[athan]]></dc:creator><pubDate>Sun, 28 Oct 2007 10:01:48 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 10:21:00 GMT]]></title><description><![CDATA[<p>außerdem hilft mir das leider immernochnet weiter.<br />
wenn du dir ma meinen quelltext ansiehst, kannste sehen, dass dein vorschlag da nicht reinpasst <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title="=/"
      alt="😕"
    /></p>
<p>ich will doch einfach nur (erg=ganze zahl?!) formulieren, geht das denn nicht??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393488</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393488</guid><dc:creator><![CDATA[athan]]></dc:creator><pubDate>Sun, 28 Oct 2007 10:21:00 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 10:45:18 GMT]]></title><description><![CDATA[<p>klar geht das, wurd ja auch schon mehr als einmal erwähnt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<pre><code class="language-cpp">if(zahl % 2)
  // rest == 1: ungerade
else
  // rest == 0: gerade
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1393492</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393492</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Sun, 28 Oct 2007 10:45:18 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 12:31:03 GMT]]></title><description><![CDATA[<p>ich rede aber schon lange netmehr von gerade und ungerade <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393544</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393544</guid><dc:creator><![CDATA[athan]]></dc:creator><pubDate>Sun, 28 Oct 2007 12:31:03 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 12:47:55 GMT]]></title><description><![CDATA[<p>athan schrieb:</p>
<blockquote>
<p>ich rede aber schon lange netmehr von gerade und ungerade <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
</blockquote>
<p>thordk lebt noch in der Steinzeit ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393551</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393551</guid><dc:creator><![CDATA[athan]]></dc:creator><pubDate>Sun, 28 Oct 2007 12:47:55 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 12:58:49 GMT]]></title><description><![CDATA[<p>Wie es mit &quot;ganze zahl&quot; geht wurde auch schon gesagt. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1393555</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393555</guid><dc:creator><![CDATA[athan]]></dc:creator><pubDate>Sun, 28 Oct 2007 12:58:49 GMT</pubDate></item><item><title><![CDATA[Reply to bedinung zahl=ungerade? on Sun, 28 Oct 2007 13:01:40 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">a%n=erg   -&gt; liefert den rest wenn man a/n teilt

if(erg==0)  -&gt; ist der rest 0, ist n ein teiler von a

Primzahltest:

bool IsPrime(int a)
{
      for(int n=2;n&lt;=sqrt(a);n++)
      {
           if(a%n==0)
                 return false;
      }
return true;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1393557</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1393557</guid><dc:creator><![CDATA[MasterCounter]]></dc:creator><pubDate>Sun, 28 Oct 2007 13:01:40 GMT</pubDate></item></channel></rss>