<?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[for in for]]></title><description><![CDATA[<pre><code>[code]#include &lt;iostream&gt;
#include &lt;cmath&gt;
using namespace std;
int zahl; // Primzahl
int teiler;
int prob;

int main(int argc, const char * argv[])
{

    for(zahl=1; zahl&lt;=20; zahl=zahl+2)
        {
        cout&lt;&lt;zahl&lt;&lt;&quot; = zahl \n&quot;;

        for(teiler=20; teiler&lt;=2; teiler=teiler-1)
            {
            cout&lt;&lt;zahl&lt;&lt;&quot;   teiler= &quot;&lt;&lt;teiler&lt;&lt;&quot;     prob= &quot;&lt;&lt;prob&lt;&lt;&quot;Wo!\n&quot;;
            //prob = 1 + teiler;
            //cout&lt;&lt;zahl&lt;&lt;&quot;  teiler= &quot;&lt;&lt;teiler&lt;&lt;&quot;     prob= &quot;&lt;&lt;prob&lt;&lt;&quot;World!\n&quot;;
            }
        }

return 0;
}
</code></pre>
<p>Kann mir mal jemand sagen, warum die zweite Schleife nicht reagiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/316368/for-in-for</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Jul 2026 07:15:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/316368.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 May 2013 14:44:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to for in for on Wed, 01 May 2013 14:44:32 GMT]]></title><description><![CDATA[<pre><code>[code]#include &lt;iostream&gt;
#include &lt;cmath&gt;
using namespace std;
int zahl; // Primzahl
int teiler;
int prob;

int main(int argc, const char * argv[])
{

    for(zahl=1; zahl&lt;=20; zahl=zahl+2)
        {
        cout&lt;&lt;zahl&lt;&lt;&quot; = zahl \n&quot;;

        for(teiler=20; teiler&lt;=2; teiler=teiler-1)
            {
            cout&lt;&lt;zahl&lt;&lt;&quot;   teiler= &quot;&lt;&lt;teiler&lt;&lt;&quot;     prob= &quot;&lt;&lt;prob&lt;&lt;&quot;Wo!\n&quot;;
            //prob = 1 + teiler;
            //cout&lt;&lt;zahl&lt;&lt;&quot;  teiler= &quot;&lt;&lt;teiler&lt;&lt;&quot;     prob= &quot;&lt;&lt;prob&lt;&lt;&quot;World!\n&quot;;
            }
        }

return 0;
}
</code></pre>
<p>Kann mir mal jemand sagen, warum die zweite Schleife nicht reagiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320101</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320101</guid><dc:creator><![CDATA[brak]]></dc:creator><pubDate>Wed, 01 May 2013 14:44:32 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Thu, 12 Jun 2014 02:00:10 GMT]]></title><description><![CDATA[<p>...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320106</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320106</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Thu, 12 Jun 2014 02:00:10 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Wed, 01 May 2013 18:14:23 GMT]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
using namespace std;

int main()
{
    for(int zahl=1; zahl&lt;=20; zahl=zahl+2)
        {
        cout&lt;&lt;zahl&lt;&lt;&quot; = zahl \n&quot;;

        for(int teiler=20; teiler&lt;=2; teiler=teiler-1)
            {
            cout&lt;&lt;zahl&lt;&lt;&quot;   teiler= &quot;&lt;&lt;teiler&lt;&lt;&quot;Wo!\n&quot;;
            int prob = 1 + teiler;
            //cout&lt;&lt;zahl&lt;&lt;&quot;  teiler= &quot;&lt;&lt;teiler&lt;&lt;&quot;     prob= &quot;&lt;&lt;prob&lt;&lt;&quot;World!\n&quot;;
            }
        }
return 0;
}
</code></pre>
<p>Diene letzte Frge versteh ich nicht.</p>
<p>es läuft trotzdem nicht....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320151</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320151</guid><dc:creator><![CDATA[brak]]></dc:creator><pubDate>Wed, 01 May 2013 18:14:23 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Thu, 12 Jun 2014 02:04:40 GMT]]></title><description><![CDATA[<p>...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320154</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320154</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Thu, 12 Jun 2014 02:04:40 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Thu, 12 Jun 2014 02:00:13 GMT]]></title><description><![CDATA[<p>...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320160</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320160</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Thu, 12 Jun 2014 02:00:13 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Wed, 01 May 2013 18:38:24 GMT]]></title><description><![CDATA[<p>Sag mir doch mal bitte, was Cli ist, und was ich verändern muß... bin selbstlerner und ehrlich gesagt, ist mir auch bicht recht deutlich, was der Unterschied zwischen C und C++ ist, außer das es neuere Versionen sind.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320161</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320161</guid><dc:creator><![CDATA[brak]]></dc:creator><pubDate>Wed, 01 May 2013 18:38:24 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Thu, 12 Jun 2014 02:00:16 GMT]]></title><description><![CDATA[<p>...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320164</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Thu, 12 Jun 2014 02:00:16 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Wed, 01 May 2013 19:14:24 GMT]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
using namespace std;
int diverg;
int zahl;
int teiler;

int main()
{
    for(zahl=3; zahl&lt;=20; zahl=zahl+2)
        {
        cout&lt;&lt;zahl&lt;&lt;&quot; = zahl \n&quot;;

        for(teiler=2; teiler&lt;=zahl/2; teiler=teiler+1)
            {
            cout&lt;&lt;zahl&lt;&lt;&quot;  teiler = &quot;&lt;&lt;teiler&lt;&lt;&quot;\n&quot;;
            diverg = zahl/teiler;
            cout&lt;&lt;zahl&lt;&lt;&quot;  teiler = &quot;&lt;&lt;teiler&lt;&lt;&quot;     diverg = &quot;&lt;&lt;diverg&lt;&lt;&quot; \n&quot;;
            }
        }
return 0;
}
</code></pre>
<p>Danke, habs in die Gänge bekommen, jetzt geht es weiter .....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320173</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320173</guid><dc:creator><![CDATA[brak]]></dc:creator><pubDate>Wed, 01 May 2013 19:14:24 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Thu, 12 Jun 2014 02:00:20 GMT]]></title><description><![CDATA[<p>...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320178</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320178</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Thu, 12 Jun 2014 02:00:20 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Wed, 01 May 2013 21:10:23 GMT]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
using namespace std;
int diverg;
int zahl;
int teiler;
int multzehl;
int pzz=3;

int main()
{
    cout&lt;&lt;&quot;2 ist prim \n3 ist prim \n5 ist prim\n&quot;;
    for(zahl=7; zahl&lt;=100000; zahl=zahl+2)
        {
        //cout&lt;&lt;zahl&lt;&lt;&quot; = zahl \n&quot;;

        for(teiler=2; teiler&lt;=zahl/2; teiler=teiler+1)
            {
            // cout&lt;&lt;zahl&lt;&lt; &quot;  teiler = &quot;&lt;&lt;teiler&lt;&lt; &quot; \n&quot;;
            diverg = zahl%teiler;
                //cout&lt;&lt;diverg&lt;&lt;&quot; diverg \n&quot;;
                if (diverg == 0)
                    {
                        //cout&lt;&lt;zahl&lt;&lt;&quot;  teiler = &quot;&lt;&lt;teiler&lt;&lt;&quot;     diverg = &quot;&lt;&lt;diverg&lt;&lt;&quot; \n&quot;;
                        //cout&lt;&lt;zahl&lt;&lt; &quot; ist nicht prim  \n&quot;;
                        break;
                    }
                else
                    {
                        if (teiler == (zahl-1)/2)
                        {
                            pzz=pzz+1;
                            cout&lt;&lt;zahl&lt;&lt; &quot; ist die &quot;&lt;&lt;pzz&lt;&lt;&quot;. Primzahl  \n&quot;;
                            break;
                        }
                        else
                        {
                        //cout&lt;&lt;zahl&lt;&lt; &quot; ist nicht b prim  \n&quot;;

                        }

                    //cout&lt;&lt;zahl&lt;&lt;&quot;  teiler = &quot;&lt;&lt;teiler&lt;&lt;&quot;     diverg = &quot;&lt;&lt;diverg&lt;&lt;&quot; \n&quot;;
                    //cout&lt;&lt;zahl&lt;&lt; &quot; ist  prim  \n&quot;;
                    //break;
                    }

                multzehl=multzehl*diverg;
                //cout&lt;&lt;multzehl&lt;&lt;&quot; multzehl \n&quot;;
            }
        }
return 0;
}
</code></pre>
<p>kikk ma es funksioniert - jetz will ich alle sümmetrischen Primzahlprinzen raussuchen....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320191</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320191</guid><dc:creator><![CDATA[brak]]></dc:creator><pubDate>Wed, 01 May 2013 21:10:23 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Wed, 01 May 2013 21:07:40 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/u18363" rel="nofollow">Jochen Kalmbach</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/f58" rel="nofollow">C++/CLI mit .NET</a> in das Forum <a href="http://www.c-plusplus.net/forum/f10" rel="nofollow">C (C89, C99 und C11)</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320196</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320196</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Wed, 01 May 2013 21:07:40 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Wed, 01 May 2013 22:13:48 GMT]]></title><description><![CDATA[<p>Swordfish schrieb:</p>
<blockquote>
<p>Nö, C++ ist keine &quot;neuere Version von C&quot;. C und C++ sind zwei verschiedene Sprachen.</p>
</blockquote>
<p>Richtig. Und daher macht der Thread eine weitere Reise, denn das ist C++ und sei es auch noch so schlecht.</p>
<p>brak  schrieb:</p>
<blockquote>
<p>kikk ma es funksioniert - jetz will ich alle sümmetrischen Primzahlprinzen raussuchen....</p>
</blockquote>
<p>Das schlimme an solchen Beiträgen ist, dass ich angesichts dessen, was hier sonst manchmal so geschrieben wird, wirklich nicht mehr unterscheiden kann, ob das ernst gemeint ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320210</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320210</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 01 May 2013 22:13:48 GMT</pubDate></item><item><title><![CDATA[Reply to for in for on Wed, 01 May 2013 22:13:59 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/u109509" rel="nofollow">SeppJ</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/f10" rel="nofollow">C (C89, C99 und C11)</a> in das Forum <a href="http://www.c-plusplus.net/forum/f15" rel="nofollow">C++ (auch C++0x und C++11)</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2320211</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2320211</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Wed, 01 May 2013 22:13:59 GMT</pubDate></item></channel></rss>