<?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[Bubblesort]]></title><description><![CDATA[<p>Hallo leute! Könntet ihr mir mal beidem Bubbleosrt helfen?Er zeigt mir irgendwie nicht das sortierte richtig an.. Irgendwas muss mit sder scheleife sein! Könntet ihr mir helfen?? Danke!!!!</p>
<p>#include &lt;stdlib.h&gt; // rand() Zufallszahlengenerator<br />
#include &lt;time.h&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;conio.h&gt; // srand() Initialisierung<br />
using namespace std;</p>
<p>int main()<br />
{<br />
int x[100], temp, a, b, i;</p>
<p>time_t timer; //time_t Integertyp in Headerdatei time.h definiert<br />
srand((unsigned)time(&amp;timer)); // srand() initialisiert Zufallszahlengenerator</p>
<p>//Das Array mit 100 zufälligen Zahlen füllen<br />
cout&lt;&lt;&quot;100 Zahlen unsortiert:\n&quot;&lt;&lt;endl;<br />
for (i=0; i&lt;100; i++)<br />
{<br />
x[i] = rand()% 100; // Wählt eine Zufalsszahl zwischen 1 und 100<br />
cout&lt;&lt;x[i];<br />
cout.width(4);</p>
<p>}</p>
<p>cout&lt;&lt;&quot;100 Zahlen sortiert:\n&quot;&lt;&lt;endl;<br />
cout&lt;&lt;x[0]&lt;&lt;endl;<br />
for (i=0; i&lt;100; i++)<br />
{<br />
cout&lt;&lt;x[i];<br />
cout.width(4);</p>
<p>for (i=0; i&lt;100; i++)<br />
{<br />
if (x[i] &gt; x[i+1])<br />
{<br />
temp = x[i];<br />
x[i] = x[i+1];<br />
x[i+1] = temp;<br />
}<br />
}</p>
<p>}<br />
getch();</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/166480/bubblesort</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 10:59:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/166480.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 29 Nov 2006 17:27:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bubblesort on Wed, 29 Nov 2006 17:27:47 GMT]]></title><description><![CDATA[<p>Hallo leute! Könntet ihr mir mal beidem Bubbleosrt helfen?Er zeigt mir irgendwie nicht das sortierte richtig an.. Irgendwas muss mit sder scheleife sein! Könntet ihr mir helfen?? Danke!!!!</p>
<p>#include &lt;stdlib.h&gt; // rand() Zufallszahlengenerator<br />
#include &lt;time.h&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;conio.h&gt; // srand() Initialisierung<br />
using namespace std;</p>
<p>int main()<br />
{<br />
int x[100], temp, a, b, i;</p>
<p>time_t timer; //time_t Integertyp in Headerdatei time.h definiert<br />
srand((unsigned)time(&amp;timer)); // srand() initialisiert Zufallszahlengenerator</p>
<p>//Das Array mit 100 zufälligen Zahlen füllen<br />
cout&lt;&lt;&quot;100 Zahlen unsortiert:\n&quot;&lt;&lt;endl;<br />
for (i=0; i&lt;100; i++)<br />
{<br />
x[i] = rand()% 100; // Wählt eine Zufalsszahl zwischen 1 und 100<br />
cout&lt;&lt;x[i];<br />
cout.width(4);</p>
<p>}</p>
<p>cout&lt;&lt;&quot;100 Zahlen sortiert:\n&quot;&lt;&lt;endl;<br />
cout&lt;&lt;x[0]&lt;&lt;endl;<br />
for (i=0; i&lt;100; i++)<br />
{<br />
cout&lt;&lt;x[i];<br />
cout.width(4);</p>
<p>for (i=0; i&lt;100; i++)<br />
{<br />
if (x[i] &gt; x[i+1])<br />
{<br />
temp = x[i];<br />
x[i] = x[i+1];<br />
x[i+1] = temp;<br />
}<br />
}</p>
<p>}<br />
getch();</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1183969</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1183969</guid><dc:creator><![CDATA[taikahn20]]></dc:creator><pubDate>Wed, 29 Nov 2006 17:27:47 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort on Wed, 29 Nov 2006 17:57:55 GMT]]></title><description><![CDATA[<p>Was glaubst, können wir uns vorstellen, dass dein Rechner anzeigt? Sind wir Geisterheiler?</p>
<p>Hascht du dir den BubbleSort mal richtig überlegt? Du vergleichst das erste Element mit dem zweiten, usw. dh. auch x[99] &gt; x[100] ??</p>
<p>Gruss Jerry</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1183982</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1183982</guid><dc:creator><![CDATA[jerry]]></dc:creator><pubDate>Wed, 29 Nov 2006 17:57:55 GMT</pubDate></item></channel></rss>