<?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[Ein paar Fragen - anfänger :-(]]></title><description><![CDATA[<p>Hallo,</p>
<p>Habe folgende Aufgaben bekommen, aber komme einfach nicht weiter.</p>
<blockquote>
<p>Schreiben Sie ein C++ Programm, welches 3 ganze Zahlen von der Standardeingabe<br />
(Tastatur) einliest und diese sortiert in absteigender Reihenfolge in<br />
einer Zeile mit : getrennt auf der Standardausgabe (Bildschirm) ausgibt?</p>
</blockquote>
<p>Bisher habe ich folgendes, aber es ist vermutlich doch nur Schrott. Ich hoffen, mir kann jemand helfen und mir die Lösung oder wenigstens einen Ansatz geben, wie es funktioniert.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

int main()
{
    int a, b, c, d, e, f;

    cout &lt;&lt; &quot; Bitte eine ganze Zahl eingeben: &quot;;
    cin &gt;&gt; a;
    cout &lt;&lt; &quot; Bitte noch eine andere ganze Zahl eingeben: &quot;;
    cin &gt;&gt; b;
    cout &lt;&lt; &quot; Und bitte noch eine andere ganze Zahl eingeben: &quot;;
    cin &gt;&gt; c;
    if (a &gt; b)
    else if (b &gt; c) a = e
    if (a &gt; c) a = e;
    else if (a &lt; c) c = e;
    if (b &gt; c) b = f;
    else if (b &lt; c) c = f;
    cout  &lt;&lt; &quot; d:e:f &quot; ;

    system(&quot;PAUSE&quot;);
    return 0;
}
</code></pre>
<p>Und noch eine:</p>
<blockquote>
<p>Aus welchen Teilen besteht eine float- Zahl, wenn sie nach dem IEEE<br />
Standard 754 abgelegt wird? Wie viel Speicherplatz wird fur jede einzelne<br />
Komponente benotigt?</p>
</blockquote>
<p>Meine Antwort (stimmt die??)</p>
<blockquote>
<p>c)Sie besteht aus Mantisse, Exponent und dem Vorzeichen. 24 Bit wird für die Mantisse benötigt, obwohl es eigentlich nur 23 Bit sind, da das erste Bit der Mantisse immer 1 ist und deshalb nicht explizit abgespeichert wird.8 Bit werden für den Exponenten gebraucht und 1 Bit für das Vorzeichen. Zusammen macht das 32 Bit, also 4 Byte.</p>
</blockquote>
<p>Und kann mir dazu evt. jemand Lesematerial geben?</p>
<p>Danke schonmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/225173/ein-paar-fragen-anfänger</link><generator>RSS for Node</generator><lastBuildDate>Thu, 01 Oct 2026 18:53:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/225173.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Oct 2008 13:56:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ein paar Fragen - anfänger :-( on Mon, 20 Oct 2008 13:56:09 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Habe folgende Aufgaben bekommen, aber komme einfach nicht weiter.</p>
<blockquote>
<p>Schreiben Sie ein C++ Programm, welches 3 ganze Zahlen von der Standardeingabe<br />
(Tastatur) einliest und diese sortiert in absteigender Reihenfolge in<br />
einer Zeile mit : getrennt auf der Standardausgabe (Bildschirm) ausgibt?</p>
</blockquote>
<p>Bisher habe ich folgendes, aber es ist vermutlich doch nur Schrott. Ich hoffen, mir kann jemand helfen und mir die Lösung oder wenigstens einen Ansatz geben, wie es funktioniert.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

int main()
{
    int a, b, c, d, e, f;

    cout &lt;&lt; &quot; Bitte eine ganze Zahl eingeben: &quot;;
    cin &gt;&gt; a;
    cout &lt;&lt; &quot; Bitte noch eine andere ganze Zahl eingeben: &quot;;
    cin &gt;&gt; b;
    cout &lt;&lt; &quot; Und bitte noch eine andere ganze Zahl eingeben: &quot;;
    cin &gt;&gt; c;
    if (a &gt; b)
    else if (b &gt; c) a = e
    if (a &gt; c) a = e;
    else if (a &lt; c) c = e;
    if (b &gt; c) b = f;
    else if (b &lt; c) c = f;
    cout  &lt;&lt; &quot; d:e:f &quot; ;

    system(&quot;PAUSE&quot;);
    return 0;
}
</code></pre>
<p>Und noch eine:</p>
<blockquote>
<p>Aus welchen Teilen besteht eine float- Zahl, wenn sie nach dem IEEE<br />
Standard 754 abgelegt wird? Wie viel Speicherplatz wird fur jede einzelne<br />
Komponente benotigt?</p>
</blockquote>
<p>Meine Antwort (stimmt die??)</p>
<blockquote>
<p>c)Sie besteht aus Mantisse, Exponent und dem Vorzeichen. 24 Bit wird für die Mantisse benötigt, obwohl es eigentlich nur 23 Bit sind, da das erste Bit der Mantisse immer 1 ist und deshalb nicht explizit abgespeichert wird.8 Bit werden für den Exponenten gebraucht und 1 Bit für das Vorzeichen. Zusammen macht das 32 Bit, also 4 Byte.</p>
</blockquote>
<p>Und kann mir dazu evt. jemand Lesematerial geben?</p>
<p>Danke schonmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601714</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601714</guid><dc:creator><![CDATA[jsadflk]]></dc:creator><pubDate>Mon, 20 Oct 2008 13:56:09 GMT</pubDate></item><item><title><![CDATA[Reply to Ein paar Fragen - anfänger :-( on Mon, 20 Oct 2008 14:02:06 GMT]]></title><description><![CDATA[<p>Sinnvoller wäre es, die Werte in ein Array (Feld) einzulesen. Das kannst du dann einfacher (z.B. per std::sort) sortieren und sparst dir somit den unübersichtlichen und nicht gerade dynamischen Haufen von if-Abfragen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601719</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601719</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Mon, 20 Oct 2008 14:02:06 GMT</pubDate></item><item><title><![CDATA[Reply to Ein paar Fragen - anfänger :-( on Mon, 20 Oct 2008 14:08:25 GMT]]></title><description><![CDATA[<p>das ziel soll doch sein ,dass er ein sotieralgorithmus schreibt hierzu<br />
-&gt; schau dir mal bubblesort an<br />
<a href="http://de.wikipedia.org/wiki/Bubblesort" rel="nofollow">http://de.wikipedia.org/wiki/Bubblesort</a><br />
das ist das was du suchst bzw was besser und flexibler ist<br />
dann solltest dur dir noch ein mal die ausgebe anschauen thema variablen ausgeben</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601723</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601723</guid><dc:creator><![CDATA[123]]></dc:creator><pubDate>Mon, 20 Oct 2008 14:08:25 GMT</pubDate></item></channel></rss>