<?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[Do while Schleife]]></title><description><![CDATA[<p>N´Abend<br />
Ich habe ein kleines Verständniss Problem mit meiner Do-While Schleife.<br />
Irgendwie finde ich den Fehler nicht, könnt Ihr mir bitte helfen ...</p>
<pre><code>do	{
	printf(&quot;\n Bitte geben Sie den ersten wert ein: &quot;);
	scanf(&quot; %f&quot;,&amp;wert);
	printf( &quot; Bitte geben Sie den zweiten wert ein:&quot;);
	scanf(&quot; %f&quot;,&amp;wert2);
	printf(&quot; Bitte geben Sie den Operator ein ( *, /, -, + ) 'q' zum beenden eingeben ...&quot;);
	scanf(&quot; %c&quot;,&amp;art);
	switch (art)
	case '+':
	{
        ergebniss=wert+wert2;
        printf(&quot;Das Ergebniss beträgt : %f&quot;,ergebniss);
        break;
    case '-':
        ergebniss=wert-wert2;
        printf(&quot;Das Ergebniss beträgt : %f&quot;,ergebniss);
        break;
    case '*':
        ergebniss=wert*wert2;
        printf(&quot;Das Ergebniss beträgt : %f&quot;,ergebniss);
        break;
    case '/':
        ergebniss=wert/wert2;
        printf(&quot;Das Ergebniss beträgt : %f&quot;,ergebniss);
        break;
     case 'q':
     case 'Q':
        printf(&quot; das Programm wird beendet\n &quot;);
        break;
     default :
            break;
        };
    }
    while(art!='q'||art !='Q');
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/328717/do-while-schleife</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 13:40:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/328717.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Oct 2014 18:46:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Do while Schleife on Thu, 23 Oct 2014 18:46:49 GMT]]></title><description><![CDATA[<p>N´Abend<br />
Ich habe ein kleines Verständniss Problem mit meiner Do-While Schleife.<br />
Irgendwie finde ich den Fehler nicht, könnt Ihr mir bitte helfen ...</p>
<pre><code>do	{
	printf(&quot;\n Bitte geben Sie den ersten wert ein: &quot;);
	scanf(&quot; %f&quot;,&amp;wert);
	printf( &quot; Bitte geben Sie den zweiten wert ein:&quot;);
	scanf(&quot; %f&quot;,&amp;wert2);
	printf(&quot; Bitte geben Sie den Operator ein ( *, /, -, + ) 'q' zum beenden eingeben ...&quot;);
	scanf(&quot; %c&quot;,&amp;art);
	switch (art)
	case '+':
	{
        ergebniss=wert+wert2;
        printf(&quot;Das Ergebniss beträgt : %f&quot;,ergebniss);
        break;
    case '-':
        ergebniss=wert-wert2;
        printf(&quot;Das Ergebniss beträgt : %f&quot;,ergebniss);
        break;
    case '*':
        ergebniss=wert*wert2;
        printf(&quot;Das Ergebniss beträgt : %f&quot;,ergebniss);
        break;
    case '/':
        ergebniss=wert/wert2;
        printf(&quot;Das Ergebniss beträgt : %f&quot;,ergebniss);
        break;
     case 'q':
     case 'Q':
        printf(&quot; das Programm wird beendet\n &quot;);
        break;
     default :
            break;
        };
    }
    while(art!='q'||art !='Q');
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2423672</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423672</guid><dc:creator><![CDATA[Theo22212]]></dc:creator><pubDate>Thu, 23 Oct 2014 18:46:49 GMT</pubDate></item><item><title><![CDATA[Reply to Do while Schleife on Thu, 23 Oct 2014 18:53:53 GMT]]></title><description><![CDATA[<p>Das Problem müsstest du aber auch beschreiben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2423675</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423675</guid><dc:creator><![CDATA[simbad]]></dc:creator><pubDate>Thu, 23 Oct 2014 18:53:53 GMT</pubDate></item><item><title><![CDATA[Reply to Do while Schleife on Thu, 23 Oct 2014 19:01:56 GMT]]></title><description><![CDATA[<p>Eine Frage der Logik:</p>
<pre><code class="language-cpp">do
{
} while(art!='q' &amp;&amp; art !='Q');
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2423677</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423677</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Thu, 23 Oct 2014 19:01:56 GMT</pubDate></item><item><title><![CDATA[Reply to Do while Schleife on Thu, 23 Oct 2014 19:04:59 GMT]]></title><description><![CDATA[<p>Und dir ist hoffentlich bewusst, dass das C Code ist, oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2423678</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423678</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Thu, 23 Oct 2014 19:04:59 GMT</pubDate></item><item><title><![CDATA[Reply to Do while Schleife on Thu, 23 Oct 2014 19:09:25 GMT]]></title><description><![CDATA[<p>Nathan schrieb:</p>
<blockquote>
<p>Und dir ist hoffentlich bewusst, dass das C Code ist, oder?</p>
</blockquote>
<p>Kann doch in einer Klasse oder einem Template eingebettet sein, oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2423680</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423680</guid><dc:creator><![CDATA[simbad]]></dc:creator><pubDate>Thu, 23 Oct 2014 19:09:25 GMT</pubDate></item><item><title><![CDATA[Reply to Do while Schleife on Thu, 23 Oct 2014 19:12:21 GMT]]></title><description><![CDATA[<p>Ja danke<br />
ist mir bewusst das es sich um C code handelt.<br />
Mein Lehrer will das so ...<br />
Danke Th69 jetzt weiß ich wo der fehler lag...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2423682</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423682</guid><dc:creator><![CDATA[Theo22212]]></dc:creator><pubDate>Thu, 23 Oct 2014 19:12:21 GMT</pubDate></item><item><title><![CDATA[Reply to Do while Schleife on Thu, 23 Oct 2014 19:35:54 GMT]]></title><description><![CDATA[<p>simbad schrieb:</p>
<blockquote>
<p>Nathan schrieb:</p>
<blockquote>
<p>Und dir ist hoffentlich bewusst, dass das C Code ist, oder?</p>
</blockquote>
<p>Kann doch in einer Klasse oder einem Template eingebettet sein, oder?</p>
</blockquote>
<p>Trotzdem gibt es keinen vernünftigen Grund in C++ printf zu verwenden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2423684</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423684</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Thu, 23 Oct 2014 19:35:54 GMT</pubDate></item><item><title><![CDATA[Reply to Do while Schleife on Thu, 23 Oct 2014 20:00:30 GMT]]></title><description><![CDATA[<p>Nathan schrieb:</p>
<blockquote>
<p>Trotzdem gibt es keinen vernünftigen Grund in C++ printf zu verwenden.</p>
</blockquote>
<p>Und für scanf noch viel weniger. Das hab ich ja fast 20 Jahre nicht mehr gesehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2423692</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423692</guid><dc:creator><![CDATA[MichelRT]]></dc:creator><pubDate>Thu, 23 Oct 2014 20:00:30 GMT</pubDate></item><item><title><![CDATA[Reply to Do while Schleife on Fri, 24 Oct 2014 08:26:25 GMT]]></title><description><![CDATA[<p>Nathan schrieb:</p>
<blockquote>
<p>simbad schrieb:</p>
<blockquote>
<p>Nathan schrieb:</p>
<blockquote>
<p>Und dir ist hoffentlich bewusst, dass das C Code ist, oder?</p>
</blockquote>
<p>Kann doch in einer Klasse oder einem Template eingebettet sein, oder?</p>
</blockquote>
<p>Trotzdem gibt es keinen vernünftigen Grund in C++ printf zu verwenden.</p>
</blockquote>
<p>Konfigurierbare Formate?<br />
Eine Konfigurationsdatei enthält den Format-String und den setze ich 1:1 ins printf als Format ein.<br />
Wäre zum Beispiel eine, wie ich denke, durchaus sinnvolle Anwendung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2423763</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423763</guid><dc:creator><![CDATA[simbad]]></dc:creator><pubDate>Fri, 24 Oct 2014 08:26:25 GMT</pubDate></item><item><title><![CDATA[Reply to Do while Schleife on Fri, 24 Oct 2014 08:51:10 GMT]]></title><description><![CDATA[<p>Nathan schrieb:</p>
<blockquote>
<p>Trotzdem gibt es keinen vernünftigen Grund in C++ printf zu verwenden.</p>
</blockquote>
<p>Doch. Wenn man keinen Bock hat für Fließkommaformatierung zwei Zeilen I/O-Manipulatoren reinzuhauen. (Das ist hier nicht der Fall, ich antworte jedoch auf deine Pauschalaussage)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2423766</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423766</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Fri, 24 Oct 2014 08:51:10 GMT</pubDate></item><item><title><![CDATA[Reply to Do while Schleife on Fri, 24 Oct 2014 09:25:12 GMT]]></title><description><![CDATA[<p>Arcoth schrieb:</p>
<blockquote>
<p>Nathan schrieb:</p>
<blockquote>
<p>Trotzdem gibt es keinen vernünftigen Grund in C++ printf zu verwenden.</p>
</blockquote>
<p>Doch. Wenn man keinen Bock hat für Fließkommaformatierung zwei Zeilen I/O-Manipulatoren reinzuhauen. (Das ist hier nicht der Fall, ich antworte jedoch auf deine Pauschalaussage)</p>
</blockquote>
<p>Das ist genau richtig. Mit iostreams ist es echt schwer, Ausgaben schön zu formatieren. Mit printf ist das viel leichter. Wirklich schade. Ich mag ansonsten iostreams.</p>
<p>Ein anderes Argument ist, dass printf schneller ist. Mit einem einfachen Benchmark ist es leicht zu zeigen. Sicher betrifft das nur die jeweilige Implementierung aber bei denen, die ich getestet habe, trifft das zu.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2423772</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2423772</guid><dc:creator><![CDATA[tntnet]]></dc:creator><pubDate>Fri, 24 Oct 2014 09:25:12 GMT</pubDate></item></channel></rss>