<?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 else Anfänger]]></title><description><![CDATA[<p>hallo!</p>
<p>Ich habe da so ein Problem<br />
Ich bin Anfänger und weiss nicht wie ich zu ner &quot;Endlosschleife&quot; machen kann.<br />
Also ich möchte, dass man ein Ergebnis eingibt. Wenn dieses falsch ist soll man nochmals aufgefordert werden das Ergebnis einzugeben. Aber wie geht das?<br />
Wäre über jeden Ratschlag dankbar.</p>
<pre><code class="language-cpp">cout &lt;&lt; &quot;Geben Sie das Ergebnis ein:&quot; &lt;&lt; endl;
cin &gt;&gt; Ergebnis;
if(!Ergebnis) 
{cout &lt;&lt; &quot;Falsch&quot; &lt;&lt; endl;
 //hier fehlt was, denn hier solls ja wieder an den Anfang springen
}
else
{
cout &lt;&lt; &quot;Richtig&quot;;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/228380/if-else-anfänger</link><generator>RSS for Node</generator><lastBuildDate>Tue, 29 Sep 2026 17:00:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/228380.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 27 Nov 2008 14:26:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to if else Anfänger on Thu, 27 Nov 2008 14:26:11 GMT]]></title><description><![CDATA[<p>hallo!</p>
<p>Ich habe da so ein Problem<br />
Ich bin Anfänger und weiss nicht wie ich zu ner &quot;Endlosschleife&quot; machen kann.<br />
Also ich möchte, dass man ein Ergebnis eingibt. Wenn dieses falsch ist soll man nochmals aufgefordert werden das Ergebnis einzugeben. Aber wie geht das?<br />
Wäre über jeden Ratschlag dankbar.</p>
<pre><code class="language-cpp">cout &lt;&lt; &quot;Geben Sie das Ergebnis ein:&quot; &lt;&lt; endl;
cin &gt;&gt; Ergebnis;
if(!Ergebnis) 
{cout &lt;&lt; &quot;Falsch&quot; &lt;&lt; endl;
 //hier fehlt was, denn hier solls ja wieder an den Anfang springen
}
else
{
cout &lt;&lt; &quot;Richtig&quot;;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1621841</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1621841</guid><dc:creator><![CDATA[anfänger_001]]></dc:creator><pubDate>Thu, 27 Nov 2008 14:26:11 GMT</pubDate></item><item><title><![CDATA[Reply to if else Anfänger on Thu, 27 Nov 2008 14:31:50 GMT]]></title><description><![CDATA[<p>Wenn du eine endlosSCHLEIFE haben willst...solltest du auch eine Schleife einbauen!</p>
<pre><code class="language-cpp">Ergebnis mit falsch initialisieren
while(!Ergebnis){

   cout &lt;&lt; &quot;Geben Sie das Ergebnis ein:&quot; &lt;&lt; endl;
   cin &gt;&gt; Ergebnis;
   if(!Ergebnis)
       cout &lt;&lt; &quot;Falsch&quot; &lt;&lt; endl;  
}
cout &lt;&lt; &quot;Richtig&quot;;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1621848</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1621848</guid><dc:creator><![CDATA[Kuldren]]></dc:creator><pubDate>Thu, 27 Nov 2008 14:31:50 GMT</pubDate></item><item><title><![CDATA[Reply to if else Anfänger on Thu, 27 Nov 2008 14:30:52 GMT]]></title><description><![CDATA[<p>anfänger_001 schrieb:</p>
<blockquote>
<pre><code class="language-cpp">cout &lt;&lt; &quot;Geben Sie das Ergebnis ein:&quot; &lt;&lt; endl;
cin &gt;&gt; Ergebnis;
while(!Ergebnis) 
{cout &lt;&lt; &quot;Falsch&quot; &lt;&lt; endl;
 cin &gt;&gt; Ergebnis;
 //hier fehlt was, denn hier solls ja wieder an den Anfang springen
}

cout &lt;&lt; &quot;Richtig&quot;;
</code></pre>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1621849</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1621849</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Thu, 27 Nov 2008 14:30:52 GMT</pubDate></item><item><title><![CDATA[Reply to if else Anfänger on Thu, 27 Nov 2008 14:36:24 GMT]]></title><description><![CDATA[<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1621856</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1621856</guid><dc:creator><![CDATA[anfänger_001]]></dc:creator><pubDate>Thu, 27 Nov 2008 14:36:24 GMT</pubDate></item></channel></rss>