<?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[If-Schleife Problem]]></title><description><![CDATA[<p>Hi, ich habe nen Problem mit der If-Schleife.<br />
Hier mein Code.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

int main()
{
    int zahl1;
    int zahl2;
    int zahl3;

    cout &lt;&lt; &quot;Geben sie 3 Zahlen ein\n&quot;;
    cin &gt;&gt; zahl1;
    cin &gt;&gt; zahl2;
    cin &gt;&gt; zahl3;

    if (zahl1&gt;zahl2 &amp;&amp; zahl1&gt;zahl3)
    {
        cout &lt;&lt; &quot;Die größte Zahl ist &quot; &lt;&lt; zahl1;
        if (zahl2&lt;zahl3)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl2;
        }
        if (zahl3&lt;zahl2)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl3;
        }
    }
    if (zahl2&gt;zahl1 &amp;&amp; zahl2&gt;zahl3)
    {
        cout &lt;&lt; &quot;Die größte Zahl ist &quot; &lt;&lt; zahl2;
        if (zahl1&lt;zahl3)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl1;
        }
        if (zahl3&lt;zahl1)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl3;
        }
        if (zahl3&gt;zahl1 &amp;&amp; zahl3&gt;zahl2)
    {
        cout &lt;&lt; &quot;Die größte Zahl ist &quot; &lt;&lt; zahl3;
        if (zahl1&lt;zahl2)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl1;
        }
        if (zahl2&lt;zahl1)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl2;
        }
    }
    }
}
</code></pre>
<p>Der funktioniert aber nicht richtig, immer wenn ich ihn ausführeund die 3 Zahlen eingebe kommt nichts mehr also es wird nicht berechnet welche die kleinste und welche die größte Zahl ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/270540/if-schleife-problem</link><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 02:25:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/270540.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 14 Jul 2010 10:47:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to If-Schleife Problem on Wed, 14 Jul 2010 10:48:20 GMT]]></title><description><![CDATA[<p>Hi, ich habe nen Problem mit der If-Schleife.<br />
Hier mein Code.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

int main()
{
    int zahl1;
    int zahl2;
    int zahl3;

    cout &lt;&lt; &quot;Geben sie 3 Zahlen ein\n&quot;;
    cin &gt;&gt; zahl1;
    cin &gt;&gt; zahl2;
    cin &gt;&gt; zahl3;

    if (zahl1&gt;zahl2 &amp;&amp; zahl1&gt;zahl3)
    {
        cout &lt;&lt; &quot;Die größte Zahl ist &quot; &lt;&lt; zahl1;
        if (zahl2&lt;zahl3)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl2;
        }
        if (zahl3&lt;zahl2)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl3;
        }
    }
    if (zahl2&gt;zahl1 &amp;&amp; zahl2&gt;zahl3)
    {
        cout &lt;&lt; &quot;Die größte Zahl ist &quot; &lt;&lt; zahl2;
        if (zahl1&lt;zahl3)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl1;
        }
        if (zahl3&lt;zahl1)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl3;
        }
        if (zahl3&gt;zahl1 &amp;&amp; zahl3&gt;zahl2)
    {
        cout &lt;&lt; &quot;Die größte Zahl ist &quot; &lt;&lt; zahl3;
        if (zahl1&lt;zahl2)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl1;
        }
        if (zahl2&lt;zahl1)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl2;
        }
    }
    }
}
</code></pre>
<p>Der funktioniert aber nicht richtig, immer wenn ich ihn ausführeund die 3 Zahlen eingebe kommt nichts mehr also es wird nicht berechnet welche die kleinste und welche die größte Zahl ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1926071</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1926071</guid><dc:creator><![CDATA[*amp**9679*ROBBY*amp**967]]></dc:creator><pubDate>Wed, 14 Jul 2010 10:48:20 GMT</pubDate></item><item><title><![CDATA[Reply to If-Schleife Problem on Wed, 14 Jul 2010 10:59:30 GMT]]></title><description><![CDATA[<p>●ROBBY&amp;#967 schrieb:</p>
<blockquote>
<p>Hi, ich habe nen Problem mit der If-Schleife.</p>
</blockquote>
<p>Das Problem ist, dass &quot;if&quot; keine Schleife erzeugt.</p>
<blockquote>
<p>Hier mein Code. [...]</p>
</blockquote>
<p>schau mal die Einrückung und die schließenden Klammern an, dann fällt dir vielleicht auf, dass der dritte if-Block(&quot;(zahl3&gt;zahl1 &amp;&amp; zahl3&gt;zahl2)&quot;) IM zweiten ist statt dahinter.</p>
<p>Deine Fehlerbeschreibung ist übrigens nicht ganz richtig - wenn die erste oder zweite Zahl die größte ist sollte es funktionieren.</p>
<p>Du hast außerdem noch einen logischen Fehler drin: was passiert wenn zwei Zahlen gleich groß sind?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1926078</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1926078</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Wed, 14 Jul 2010 10:59:30 GMT</pubDate></item><item><title><![CDATA[Reply to If-Schleife Problem on Wed, 14 Jul 2010 11:02:08 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>könnte auch das &quot;2. Wenn ich mein Programm ausführe, passiert gar nichts/flackert nur kurz was auf! Wieso?&quot;-Problem sein, das gut im Thread <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-151578.html" rel="nofollow">Die meistgestellten Fragen</a> beschrieben wird.</p>
<p>Kannst du einfach testen mit</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

int main() {
   std::cout &lt;&lt; &quot;hallo\n&quot;;
}
</code></pre>
<p>... wenn da auch &quot;nichts passiert&quot;, ist der o.g. Thread dein Freund. <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="😉"
    /><br />
(wobei es sich durchaus auf jeden Fall lohnen dürfte, sich den anzusehen)</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1926080</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1926080</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Wed, 14 Jul 2010 11:02:08 GMT</pubDate></item><item><title><![CDATA[Reply to If-Schleife Problem on Wed, 14 Jul 2010 11:23:04 GMT]]></title><description><![CDATA[<p>@ pumuckl<br />
Danke für den Hinweis, habe auch noch nen anderen kleinen Fehler gefunden aber jetzt funktioniert mein Code und sieht so aus</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

int main()
{
    int zahl1;
    int zahl2;
    int zahl3;

    cout &lt;&lt; &quot;Geben sie 3 unterschiedlich große Zahlen ein\n&quot;;
    cin &gt;&gt; zahl1;
    cin &gt;&gt; zahl2;
    cin &gt;&gt; zahl3;

    if (zahl1&gt;zahl2 &amp;&amp; zahl1&gt;zahl3)
    {
        cout &lt;&lt; &quot;Die größte Zahl ist &quot; &lt;&lt; zahl1 &lt;&lt; &quot;\n&quot;;
        if (zahl2&lt;zahl3)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl2 &lt;&lt; &quot;\n&quot;;
        }
        if (zahl3&lt;zahl2)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl3 &lt;&lt; &quot;\n&quot;;
        }
    }
    if (zahl2&gt;zahl1 &amp;&amp; zahl2&gt;zahl3)
    {
        cout &lt;&lt; &quot;Die größte Zahl ist &quot; &lt;&lt; zahl2 &lt;&lt; &quot;\n&quot;;
        if (zahl1&lt;zahl3)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl1 &lt;&lt; &quot;\n&quot;;
        }
        if (zahl3&lt;zahl1)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl3 &lt;&lt; &quot;\n&quot;;
        }
    }
    if (zahl3&gt;zahl1 &amp;&amp; zahl3&gt;zahl2)
    {
        cout &lt;&lt; &quot;Die größte Zahl ist &quot; &lt;&lt; zahl3 &lt;&lt; &quot;\n&quot;;
        if (zahl1&lt;zahl2)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl1 &lt;&lt; &quot;\n&quot;;
        }
        if (zahl2&lt;zahl1)
        {
            cout &lt;&lt; &quot;Die kleinste Zahl ist &quot;  &lt;&lt; zahl2 &lt;&lt; &quot;\n&quot;;
        }
    }
}
</code></pre>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/13624">@simon2</a> Dass problem kenne ich aber dass kommt bei mir nur wenn ich die Exe starte und wenn ich es aud der IDE herraus starte kommt das nicht.</p>
<p>Btw. wisst ihr wie man ö,ä,ü und ß benutzen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1926102</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1926102</guid><dc:creator><![CDATA[*amp**9679*ROBBY*amp**967]]></dc:creator><pubDate>Wed, 14 Jul 2010 11:23:04 GMT</pubDate></item><item><title><![CDATA[Reply to If-Schleife Problem on Wed, 14 Jul 2010 11:29:14 GMT]]></title><description><![CDATA[<p>●ROBBY&amp;#967 schrieb:</p>
<blockquote>
<p>Btw. wisst ihr wie man ö,ä,ü und ß benutzen kann?</p>
</blockquote>
<p>Ohne weiteres garnicht. Im normalen C++ Zeichensatz sind die nicht enthalten. Wenn du mit sowas arbeiten willst gehts dann Richtung wchar_t, locales, codepages,... alles recht kompliziertes z.T. Plattformabhängiges Gefrickel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1926107</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1926107</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Wed, 14 Jul 2010 11:29:14 GMT</pubDate></item><item><title><![CDATA[Reply to If-Schleife Problem on Wed, 14 Jul 2010 11:35:31 GMT]]></title><description><![CDATA[<p>pumuckl schrieb:</p>
<blockquote>
<p>●ROBBY&amp;#967 schrieb:</p>
<blockquote>
<p>Btw. wisst ihr wie man ö,ä,ü und ß benutzen kann?</p>
</blockquote>
<p>Ohne weiteres garnicht. Im normalen C++ Zeichensatz sind die nicht enthalten. Wenn du mit sowas arbeiten willst gehts dann Richtung wchar_t, locales, codepages,... alles recht kompliziertes z.T. Plattformabhängiges Gefrickel</p>
</blockquote>
<p>Ok, danke. Dannw werde ich wohl erstmal damit leben müssen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1926111</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1926111</guid><dc:creator><![CDATA[*amp**9679*ROBBY*amp**967]]></dc:creator><pubDate>Wed, 14 Jul 2010 11:35:31 GMT</pubDate></item><item><title><![CDATA[Reply to If-Schleife Problem on Wed, 14 Jul 2010 11:39:57 GMT]]></title><description><![CDATA[<p><a href="http://www.if-schleife.de/" rel="nofollow">If</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1926113</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1926113</guid><dc:creator><![CDATA[freaky]]></dc:creator><pubDate>Wed, 14 Jul 2010 11:39:57 GMT</pubDate></item><item><title><![CDATA[Reply to If-Schleife Problem on Wed, 14 Jul 2010 11:53:52 GMT]]></title><description><![CDATA[<p>FreakY&lt;3Cpp schrieb:</p>
<blockquote>
<p><a href="http://www.if-schleife.de/" rel="nofollow">If</a></p>
</blockquote>
<p>Ich weiß, hat pumuckl ja auch schon geschrieben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1926115</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1926115</guid><dc:creator><![CDATA[*amp**9679*ROBBY*amp**967]]></dc:creator><pubDate>Wed, 14 Jul 2010 11:53:52 GMT</pubDate></item></channel></rss>