<?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[Frage zu while-schleife (Ausgabe 10 bei 9 maligem durchlauf!! weshalb??)]]></title><description><![CDATA[<pre><code class="language-cpp">#include&lt;iostream&gt;
using namespace std;

int main ()
{
int x = 0, y = 0;
while(++y &lt; 10)
cout&lt;&lt;y;
{x += y;}
cout&lt;&lt;endl;
cout&lt;&lt;y;

system(&quot;pause&quot;);
return 0;
}
</code></pre>
<p>Weshalb gibt mir y(das letzte)10 aus wenn die schleife nur neuen mal durchloffen wird<br />
1durchlauf 0+1=1<br />
2 1+1=2<br />
3 2+1=3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9 8+1=9<br />
GRUß JÖRG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/203561/frage-zu-while-schleife-ausgabe-10-bei-9-maligem-durchlauf-weshalb</link><generator>RSS for Node</generator><lastBuildDate>Wed, 07 Oct 2026 14:09:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/203561.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Jan 2008 20:28:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Frage zu while-schleife (Ausgabe 10 bei 9 maligem durchlauf!! weshalb??) on Wed, 23 Jan 2008 20:28:47 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include&lt;iostream&gt;
using namespace std;

int main ()
{
int x = 0, y = 0;
while(++y &lt; 10)
cout&lt;&lt;y;
{x += y;}
cout&lt;&lt;endl;
cout&lt;&lt;y;

system(&quot;pause&quot;);
return 0;
}
</code></pre>
<p>Weshalb gibt mir y(das letzte)10 aus wenn die schleife nur neuen mal durchloffen wird<br />
1durchlauf 0+1=1<br />
2 1+1=2<br />
3 2+1=3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9 8+1=9<br />
GRUß JÖRG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1442343</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1442343</guid><dc:creator><![CDATA[jörgi]]></dc:creator><pubDate>Wed, 23 Jan 2008 20:28:47 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu while-schleife (Ausgabe 10 bei 9 maligem durchlauf!! weshalb??) on Wed, 23 Jan 2008 21:01:43 GMT]]></title><description><![CDATA[<p>Deine IDE hat sicher einen debugger. wäre ein einfaches beispiel den mal auszuprobieren</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1442375</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1442375</guid><dc:creator><![CDATA[tolle formatierung]]></dc:creator><pubDate>Wed, 23 Jan 2008 21:01:43 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu while-schleife (Ausgabe 10 bei 9 maligem durchlauf!! weshalb??) on Wed, 23 Jan 2008 21:11:44 GMT]]></title><description><![CDATA[<p>while fährt solange fort, bis y nicht mehr kleiner als 10 ist (also bei 10).<br />
Dabei wird der Schleifenrumpf 9-mal durchlaufen, die Bedingung aber 10-mal ausgewertet (und natürlich wird dabei jedesmal y erhöht).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1442388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1442388</guid><dc:creator><![CDATA[Nanyuki]]></dc:creator><pubDate>Wed, 23 Jan 2008 21:11:44 GMT</pubDate></item></channel></rss>