<?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[While Schleife]]></title><description><![CDATA[<p>Hi Leute hab hier n kleines Programm:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;iomanip&gt; //Für formatierte ein/ausgabe also zB hex
using namespace std;

int main()
{
int zahl; //Die zahl die er in hex haben will
cout &lt;&lt; &quot;Welche Zahl wollen sie umgerechnet bekommen?&quot; &lt;&lt; endl;
cin &gt;&gt; zahl; //Die zahl die er in Hex haben will
cout &lt;&lt; zahl &lt;&lt;  &quot; entspricht &quot; &lt;&lt; hex/*gibt die nachfolgende Zahl in hex aus*/ &lt;&lt; zahl &lt;&lt; &quot; im hexadezimalsystem&quot; &lt;&lt; endl;
cout &lt;&lt; &quot;Moechten Sie noch etwas ausrechnen?(1=Ja)(2=Nein)&quot; &lt;&lt; endl;
while(cin &gt;&gt; zahl );

system(&quot;PAUSE&quot;);
return 0;
}
</code></pre>
<p>Er fragt dann auch schön ob ich noch etwas ausrechnen möchte Ja/nein<br />
aber wenn ich dann ja oder nein wähle passiert nix is ja klar es fehtl was aber ich weiss nicht was^^ kann mir da wer weiterhelfen?</p>
<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/190096/while-schleife</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 12:56:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/190096.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 Aug 2007 15:38:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to While Schleife on Sun, 19 Aug 2007 15:38:54 GMT]]></title><description><![CDATA[<p>Hi Leute hab hier n kleines Programm:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;iomanip&gt; //Für formatierte ein/ausgabe also zB hex
using namespace std;

int main()
{
int zahl; //Die zahl die er in hex haben will
cout &lt;&lt; &quot;Welche Zahl wollen sie umgerechnet bekommen?&quot; &lt;&lt; endl;
cin &gt;&gt; zahl; //Die zahl die er in Hex haben will
cout &lt;&lt; zahl &lt;&lt;  &quot; entspricht &quot; &lt;&lt; hex/*gibt die nachfolgende Zahl in hex aus*/ &lt;&lt; zahl &lt;&lt; &quot; im hexadezimalsystem&quot; &lt;&lt; endl;
cout &lt;&lt; &quot;Moechten Sie noch etwas ausrechnen?(1=Ja)(2=Nein)&quot; &lt;&lt; endl;
while(cin &gt;&gt; zahl );

system(&quot;PAUSE&quot;);
return 0;
}
</code></pre>
<p>Er fragt dann auch schön ob ich noch etwas ausrechnen möchte Ja/nein<br />
aber wenn ich dann ja oder nein wähle passiert nix is ja klar es fehtl was aber ich weiss nicht was^^ kann mir da wer weiterhelfen?</p>
<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1347619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1347619</guid><dc:creator><![CDATA[cica]]></dc:creator><pubDate>Sun, 19 Aug 2007 15:38:54 GMT</pubDate></item><item><title><![CDATA[Reply to While Schleife on Sun, 19 Aug 2007 15:46:22 GMT]]></title><description><![CDATA[<p>cica schrieb:</p>
<blockquote>
<p>Hi Leute hab hier n kleines Programm:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;iomanip&gt; //Für formatierte ein/ausgabe also zB hex
using namespace std;

int main()
{
int zahl; //Die zahl die er in hex haben will
cout &lt;&lt; &quot;Welche Zahl wollen sie umgerechnet bekommen?&quot; &lt;&lt; endl;
cin &gt;&gt; zahl; //Die zahl die er in Hex haben will
cout &lt;&lt; zahl &lt;&lt;  &quot; entspricht &quot; &lt;&lt; hex/*gibt die nachfolgende Zahl in hex aus*/ &lt;&lt; zahl &lt;&lt; &quot; im hexadezimalsystem&quot; &lt;&lt; endl;
cout &lt;&lt; &quot;Moechten Sie noch etwas ausrechnen?(1=Ja)(2=Nein)&quot; &lt;&lt; endl;
while(cin &gt;&gt; zahl );

system(&quot;PAUSE&quot;);
return 0;
}
</code></pre>
<p>Er fragt dann auch schön ob ich noch etwas ausrechnen möchte Ja/nein<br />
aber wenn ich dann ja oder nein wähle passiert nix is ja klar es fehtl was aber ich weiss nicht was^^ kann mir da wer weiterhelfen?</p>
<p>danke</p>
</blockquote>
<p>Die while Bedingung ist erfüllt, egal ob 1 oder 2 -<br />
der while Block ist allerdings leer / enthält eine leere Anweisung ( ; ) ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1347624</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1347624</guid><dc:creator><![CDATA[Checker*amp*Murckser]]></dc:creator><pubDate>Sun, 19 Aug 2007 15:46:22 GMT</pubDate></item><item><title><![CDATA[Reply to While Schleife on Sun, 19 Aug 2007 15:50:35 GMT]]></title><description><![CDATA[<p><a href="http://www.volkard.de/vcppkold/whileschleife.html" rel="nofollow">http://www.volkard.de/vcppkold/whileschleife.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1347628</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1347628</guid><dc:creator><![CDATA[X&amp;amp;u]]></dc:creator><pubDate>Sun, 19 Aug 2007 15:50:35 GMT</pubDate></item><item><title><![CDATA[Reply to While Schleife on Sun, 19 Aug 2007 18:09:42 GMT]]></title><description><![CDATA[<p>Ja das denk ich auch ^^ aber kannst du mir ankreuzen oder gleich reinschreiben was ich wo einsetzen muss? finds net <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":-("
      alt="😞"
    /> hab auch schon tut durchgelesen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1347717</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1347717</guid><dc:creator><![CDATA[cica]]></dc:creator><pubDate>Sun, 19 Aug 2007 18:09:42 GMT</pubDate></item><item><title><![CDATA[Reply to While Schleife on Sun, 19 Aug 2007 18:45:46 GMT]]></title><description><![CDATA[<p>Mit einer do-while würds auch gehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<pre><code class="language-cpp">#include &lt;iostream&gt; 
#include &lt;iomanip&gt; //Für formatierte ein/ausgabe also zB hex 
using namespace std; 

int main() 
{ 
int frage; // Nochmal?
int zahl; //Die zahl die er in hex haben will 
do
{
cout &lt;&lt; &quot;Welche Zahl wollen sie umgerechnet bekommen?&quot; &lt;&lt; endl; 
cin &gt;&gt; zahl; //Die zahl die er in Hex haben will 
cout &lt;&lt; zahl &lt;&lt;  &quot; entspricht &quot; &lt;&lt; hex/*gibt die nachfolgende Zahl in hex aus*/ &lt;&lt; zahl &lt;&lt; &quot; im hexadezimalsystem&quot; &lt;&lt; endl; 
cout &lt;&lt; &quot;Moechten Sie noch etwas ausrechnen?(1=Ja)(2=Nein)&quot; &lt;&lt; endl; 
cin &gt;&gt; frage;
cout &lt;&lt; endl;
}
while(cin &amp;&amp; frage != 2); 

system(&quot;PAUSE&quot;); // cin.get(); hätte es auch getan
return 0; 
}
</code></pre>
<p>1. Verwende nicht system()'s<br />
2. Weise jeder Variable den Anfangswert '0' zu(wenn möglich)</p>
<p>Das einzige was nicht geprüft wird, ist das wenn der Benutzer eine andere Zahl als '1' oder '2' eingibt.</p>
<p>XP^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1347738</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1347738</guid><dc:creator><![CDATA[XP*]]></dc:creator><pubDate>Sun, 19 Aug 2007 18:45:46 GMT</pubDate></item></channel></rss>