<?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[Programm funktioniert nicht richtig]]></title><description><![CDATA[<p>Hallo zusammen!</p>
<p>Ich hab in den letzten Tagen ein Programm geschrieben, das über 1000 Zeilen hat, doch leider funktionieren die letzten ca. 70 Zeilen nicht richtig und ich suche mich schon dumm und demlich ab <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>
<p>Habe mir gedacht, dass vielleicht jemand von Euch den Code angucken könnte, denn vielleicht guck ich einfach am falschen Ort.</p>
<pre><code class="language-cpp">else if(menuauswahl == 4)
    {
         int tempauswahl;
         int temp;
         char wiederholen;

         temperaturmenue:
         do{
            system(&quot;color F0&quot;);
            system(&quot;cls&quot;);
            cout &lt;&lt; &quot; Temperatur umrechnen&quot; &lt;&lt;endl;
            cout &lt;&lt; &quot;----------------------&quot; &lt;&lt;endl;
            cout &lt;&lt; &quot; 1) Grad Celcius in Kelvin&quot;&lt;&lt;endl;
            cout &lt;&lt; &quot; 2) Kelvin in Grad Celcius&quot;&lt;&lt;endl;
            cout &lt;&lt; &quot; Bitte w&quot;&lt;&lt;ae&lt;&lt;&quot;hlen Sie Ihre gew&quot;&lt;&lt;ue&lt;&lt;&quot;nschte Option aus (1-2): &quot;;
            cin &gt;&gt; tempauswahl;
            if(tempauswahl &gt; 2 || tempauswahl &lt; 1)
            {
             fehleingabe();
            }
            {
             goto temperaturmenue;
            }
         }
         while(tempauswahl &gt; 2 || tempauswahl &lt; 1);

              if(tempauswahl == 1)
              {
               system(&quot;cls&quot;);
               cout &lt;&lt; &quot; Grad Celcius in Kelvin&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot;------------------------&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot; Bitte geben Sie die Temperatur in Celcius an: &quot;;
               cin &gt;&gt; temp;
               cout &lt;&lt; &quot; Die Temperatur in Kelvin betr&quot;&lt;&lt;ae&lt;&lt;&quot;gt &quot; &lt;&lt; temp - 273 &lt;&lt; &quot;.&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; M&quot;&lt;&lt;oe&lt;&lt;&quot;chten Sie noch noch eine Umrechnung durchf&quot;&lt;&lt;ue&lt;&lt;&quot;hren? (j/n)&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; Dr&quot;&lt;&lt;ue&lt;&lt;&quot;cken Sie H um zum Hauptmen&quot;&lt;&lt;ue&lt;&lt;&quot; zur&quot;&lt;&lt;ue&lt;&lt;&quot;ck zu kehren.&quot;;
               wiederholen = getch();
                    if(wiederholen == 'j' || wiederholen == 'J')
                    {
                     goto temperaturmenue;         //Sprung zu Waehrungsgemenue
                    }
                    if(wiederholen == 'h' || wiederholen == 'H')
                    {
                     goto hauptmenue;
                    }
                    else if(wiederholen == 'n' || wiederholen == 'N')
                    {
                     danke();
                    }
              }
              else if(tempauswahl == 2)
              {
               system(&quot;cls&quot;);
               cout &lt;&lt; &quot; Kelvin in Grad Celcius&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot;------------------------&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot; Bitte geben Sie die Temperatur in Kelvin an: &quot;;
               cin &gt;&gt; temp;
               cout &lt;&lt; &quot; Die Temperatur in Celcius betr&quot;&lt;&lt;ae&lt;&lt;&quot;gt &quot; &lt;&lt; temp + 273 &lt;&lt; &quot;.&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; M&quot;&lt;&lt;oe&lt;&lt;&quot;chten Sie noch noch eine Umrechnung durchf&quot;&lt;&lt;ue&lt;&lt;&quot;hren? (j/n)&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; Dr&quot;&lt;&lt;ue&lt;&lt;&quot;cken Sie H um zum Hauptmen&quot;&lt;&lt;ue&lt;&lt;&quot; zur&quot;&lt;&lt;ue&lt;&lt;&quot;ck zu kehren.&quot;;
               wiederholen = getch();
                    if(wiederholen == 'j' || wiederholen == 'J')
                    {
                     goto temperaturmenue;         //Sprung zu Waehrungsgemenue
                    }
                    if(wiederholen == 'h' || wiederholen == 'H')
                    {
                     goto hauptmenue;
                    }
                    else if(wiederholen == 'n' || wiederholen == 'N')
                    {
                     danke();
                    }
              }
    }
</code></pre>
<p>Das Programm soll etwa so ablaufen:</p>
<p>Temperatur umrechnen<br />
----------------------</p>
<ol>
<li>Grad Celcius in Kelvin</li>
<li>Kelvin in Grad Celcius<br />
Bitte wählen Sie Ihre gewünschte Option aus (1-2): --&gt; 1 oder 2</li>
</ol>
<p>Nun soll das Programm zu dem Punkt wechseln und die einzelnen Schritte auführen.<br />
Leider aber erscheint jetzt gleich wieder das Menü:</p>
<p>Temperatur umrechnen<br />
----------------------</p>
<ol>
<li>Grad Celcius in Kelvin</li>
<li>Kelvin in Grad Celcius<br />
Bitte wählen Sie Ihre gewünschte Option aus (1-2): --&gt; 1 oder 2</li>
</ol>
<p>Ich bin in einer Endlosschleife, in der ich eine Option wählen soll und komme nicht raus.</p>
<p>Hoffe, dass mir jemand helfen kann und meine Beschreibung klar ist, ansonsten einfach nachfragen^^</p>
<p>Danke fürs Helfen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>MfG Shivan</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/244286/programm-funktioniert-nicht-richtig</link><generator>RSS for Node</generator><lastBuildDate>Sat, 19 Sep 2026 12:15:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/244286.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 28 Jun 2009 00:47:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 00:47:48 GMT]]></title><description><![CDATA[<p>Hallo zusammen!</p>
<p>Ich hab in den letzten Tagen ein Programm geschrieben, das über 1000 Zeilen hat, doch leider funktionieren die letzten ca. 70 Zeilen nicht richtig und ich suche mich schon dumm und demlich ab <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>
<p>Habe mir gedacht, dass vielleicht jemand von Euch den Code angucken könnte, denn vielleicht guck ich einfach am falschen Ort.</p>
<pre><code class="language-cpp">else if(menuauswahl == 4)
    {
         int tempauswahl;
         int temp;
         char wiederholen;

         temperaturmenue:
         do{
            system(&quot;color F0&quot;);
            system(&quot;cls&quot;);
            cout &lt;&lt; &quot; Temperatur umrechnen&quot; &lt;&lt;endl;
            cout &lt;&lt; &quot;----------------------&quot; &lt;&lt;endl;
            cout &lt;&lt; &quot; 1) Grad Celcius in Kelvin&quot;&lt;&lt;endl;
            cout &lt;&lt; &quot; 2) Kelvin in Grad Celcius&quot;&lt;&lt;endl;
            cout &lt;&lt; &quot; Bitte w&quot;&lt;&lt;ae&lt;&lt;&quot;hlen Sie Ihre gew&quot;&lt;&lt;ue&lt;&lt;&quot;nschte Option aus (1-2): &quot;;
            cin &gt;&gt; tempauswahl;
            if(tempauswahl &gt; 2 || tempauswahl &lt; 1)
            {
             fehleingabe();
            }
            {
             goto temperaturmenue;
            }
         }
         while(tempauswahl &gt; 2 || tempauswahl &lt; 1);

              if(tempauswahl == 1)
              {
               system(&quot;cls&quot;);
               cout &lt;&lt; &quot; Grad Celcius in Kelvin&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot;------------------------&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot; Bitte geben Sie die Temperatur in Celcius an: &quot;;
               cin &gt;&gt; temp;
               cout &lt;&lt; &quot; Die Temperatur in Kelvin betr&quot;&lt;&lt;ae&lt;&lt;&quot;gt &quot; &lt;&lt; temp - 273 &lt;&lt; &quot;.&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; M&quot;&lt;&lt;oe&lt;&lt;&quot;chten Sie noch noch eine Umrechnung durchf&quot;&lt;&lt;ue&lt;&lt;&quot;hren? (j/n)&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; Dr&quot;&lt;&lt;ue&lt;&lt;&quot;cken Sie H um zum Hauptmen&quot;&lt;&lt;ue&lt;&lt;&quot; zur&quot;&lt;&lt;ue&lt;&lt;&quot;ck zu kehren.&quot;;
               wiederholen = getch();
                    if(wiederholen == 'j' || wiederholen == 'J')
                    {
                     goto temperaturmenue;         //Sprung zu Waehrungsgemenue
                    }
                    if(wiederholen == 'h' || wiederholen == 'H')
                    {
                     goto hauptmenue;
                    }
                    else if(wiederholen == 'n' || wiederholen == 'N')
                    {
                     danke();
                    }
              }
              else if(tempauswahl == 2)
              {
               system(&quot;cls&quot;);
               cout &lt;&lt; &quot; Kelvin in Grad Celcius&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot;------------------------&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot; Bitte geben Sie die Temperatur in Kelvin an: &quot;;
               cin &gt;&gt; temp;
               cout &lt;&lt; &quot; Die Temperatur in Celcius betr&quot;&lt;&lt;ae&lt;&lt;&quot;gt &quot; &lt;&lt; temp + 273 &lt;&lt; &quot;.&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; M&quot;&lt;&lt;oe&lt;&lt;&quot;chten Sie noch noch eine Umrechnung durchf&quot;&lt;&lt;ue&lt;&lt;&quot;hren? (j/n)&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; Dr&quot;&lt;&lt;ue&lt;&lt;&quot;cken Sie H um zum Hauptmen&quot;&lt;&lt;ue&lt;&lt;&quot; zur&quot;&lt;&lt;ue&lt;&lt;&quot;ck zu kehren.&quot;;
               wiederholen = getch();
                    if(wiederholen == 'j' || wiederholen == 'J')
                    {
                     goto temperaturmenue;         //Sprung zu Waehrungsgemenue
                    }
                    if(wiederholen == 'h' || wiederholen == 'H')
                    {
                     goto hauptmenue;
                    }
                    else if(wiederholen == 'n' || wiederholen == 'N')
                    {
                     danke();
                    }
              }
    }
</code></pre>
<p>Das Programm soll etwa so ablaufen:</p>
<p>Temperatur umrechnen<br />
----------------------</p>
<ol>
<li>Grad Celcius in Kelvin</li>
<li>Kelvin in Grad Celcius<br />
Bitte wählen Sie Ihre gewünschte Option aus (1-2): --&gt; 1 oder 2</li>
</ol>
<p>Nun soll das Programm zu dem Punkt wechseln und die einzelnen Schritte auführen.<br />
Leider aber erscheint jetzt gleich wieder das Menü:</p>
<p>Temperatur umrechnen<br />
----------------------</p>
<ol>
<li>Grad Celcius in Kelvin</li>
<li>Kelvin in Grad Celcius<br />
Bitte wählen Sie Ihre gewünschte Option aus (1-2): --&gt; 1 oder 2</li>
</ol>
<p>Ich bin in einer Endlosschleife, in der ich eine Option wählen soll und komme nicht raus.</p>
<p>Hoffe, dass mir jemand helfen kann und meine Beschreibung klar ist, ansonsten einfach nachfragen^^</p>
<p>Danke fürs Helfen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>MfG Shivan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733893</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733893</guid><dc:creator><![CDATA[shivan]]></dc:creator><pubDate>Sun, 28 Jun 2009 00:47:48 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 00:55:09 GMT]]></title><description><![CDATA[<p>Huhu,</p>
<p>Deine Abfrage scheint falsch zu sein bzw. die Bedingung für die While-Schleife ganz oben.</p>
<p>Du fragst zuerst ob die Zahl größer ist als 2 oder kleiner ist als 1.</p>
<p>Und dann stellst du die SELBE Bedingung bei der While-Schleife:</p>
<p>while(tempauswahl &gt; 2 || tempauswahl &lt; 1);</p>
<p>Da musst du was ändern...</p>
<p>€dit: Fazit, er kommt gar nicht rein.</p>
<p>LG Mentras</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733895</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733895</guid><dc:creator><![CDATA[Mentras]]></dc:creator><pubDate>Sun, 28 Jun 2009 00:55:09 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 00:59:26 GMT]]></title><description><![CDATA[<p>Danke, daran hab ich noch gar nicht gedacht, ich werde einfach einmal die While Schleife löschen, die ist unnötig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733896</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733896</guid><dc:creator><![CDATA[shivan]]></dc:creator><pubDate>Sun, 28 Jun 2009 00:59:26 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 01:02:30 GMT]]></title><description><![CDATA[<p>Jop ziemlich <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>
<p>Wobei ich dir raten muss, solche GoTo-Anweisungen nicht zu oft zu verwenden.<br />
Bei 1000 Zeilen Code kann da schon einige Verwirrung entstehen.</p>
<p>Eine Möglichkeit wäre, das in eine Funktion reinzustecken.</p>
<p>Ist halt Geschmackssache bzw. wenn du gute / scharfe Augen hast, dann kannst du es ruhig lassen^^</p>
<p>Schönen Tag noch!</p>
<p>Lg Mentras</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733897</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733897</guid><dc:creator><![CDATA[Mentras]]></dc:creator><pubDate>Sun, 28 Jun 2009 01:02:30 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 01:06:55 GMT]]></title><description><![CDATA[<p>Mhh.. jetzt funktioniert gar nix mehr <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="😞"
    /><br />
Hast du eine Ahnung, wie ich das Problem beheben kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733898</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733898</guid><dc:creator><![CDATA[shivan]]></dc:creator><pubDate>Sun, 28 Jun 2009 01:06:55 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 01:13:38 GMT]]></title><description><![CDATA[<p>Okey die Schleife ist weg und trotzdem hab ich das selbe Problem wie vorhin. Ich denke, dass die Schleife nicht das Problem war, denn alles war richtig, er hat sie nur nicht ausgeführt, aber das ist ja irrelevant.</p>
<p>Ich werde jetzt erstmal schlafen gehen und hoffe auf neue Comments morgen..</p>
<p>gn8</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733899</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733899</guid><dc:creator><![CDATA[shivan]]></dc:creator><pubDate>Sun, 28 Jun 2009 01:13:38 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 01:27:45 GMT]]></title><description><![CDATA[<p>Totaler Humbuk^^ Siehe 2.Post!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733900</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733900</guid><dc:creator><![CDATA[Mentras]]></dc:creator><pubDate>Sun, 28 Jun 2009 01:27:45 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 01:23:28 GMT]]></title><description><![CDATA[<p>Danke, werd ich gleich mal ausprobieren!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733901</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733901</guid><dc:creator><![CDATA[shivan]]></dc:creator><pubDate>Sun, 28 Jun 2009 01:23:28 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 01:52:38 GMT]]></title><description><![CDATA[<p>shivan schrieb:</p>
<blockquote>
<p>Okey die Schleife ist weg und trotzdem hab ich das selbe Problem wie vorhin. Ich denke, dass die Schleife nicht das Problem war, denn alles war richtig, er hat sie nur nicht ausgeführt, aber das ist ja irrelevant.</p>
</blockquote>
<pre><code class="language-cpp">do{ //Er kommt in die Schleife...
            system(&quot;color F0&quot;);  //Kenn den Befehl nicht^^ Er führt ihn aus..
            system(&quot;cls&quot;);       //Kenn den Befehl auch nicht^^ Er führt ihn aus..
            cout &lt;&lt; &quot; Temperatur umrechnen&quot; &lt;&lt;endl;  //Führt aus...
            cout &lt;&lt; &quot;----------------------&quot; &lt;&lt;endl; //Führt aus...
            cout &lt;&lt; &quot; 1) Grad Celcius in Kelvin&quot;&lt;&lt;endl; //Führt aus...
            cout &lt;&lt; &quot; 2) Kelvin in Grad Celcius&quot;&lt;&lt;endl; //Führt aus...
            cout &lt;&lt; &quot; Bitte w&quot;&lt;&lt;ae&lt;&lt;&quot;hlen Sie Ihre gew&quot;&lt;&lt;ue&lt;&lt;&quot;nschte Option aus (1-2): &quot;; //Führt aus...
            cin &gt;&gt; tempauswahl; //Führt aus...
            if(tempauswahl &gt; 2 || tempauswahl &lt; 1) // Falls Eingabe &gt; 2 oder Eingabe &lt; 1 dann...
            {
             fehleingabe();  //Funktion fehleingabe() ausführen.
            }
            //Sonst:
            {
             goto temperaturmenue; //Wieder rauf!
            }
         }
         while(tempauswahl &gt; 2 || tempauswahl &lt; 1); //Wenn ich aber jetzt was richtiges eingebe, komm ich NICHT AUS DER SCHLEIFE RAUS! Weil er erst nur rauskommt,
//wenn ich eine Zahl größer als 2 oder kleiner als 1 eingeben muss!
//Die Schleife ist unnötig, weil du schon mit der If-Abfrage prüfst ob die Eingabe passend ist.
</code></pre>
<p>€DIT: Schau auf Seite 2...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733903</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733903</guid><dc:creator><![CDATA[Mentras]]></dc:creator><pubDate>Sun, 28 Jun 2009 01:52:38 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 01:49:59 GMT]]></title><description><![CDATA[<p>Leider hab ich immer noch das selbe Ergebnis wie vorher!</p>
<p>Aber danke dir für deine Bemühungen! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733904</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733904</guid><dc:creator><![CDATA[shivan]]></dc:creator><pubDate>Sun, 28 Jun 2009 01:49:59 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 01:51:46 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">temperaturmenue:
            system(&quot;color F0&quot;);
            system(&quot;cls&quot;);
            cout &lt;&lt; &quot; Temperatur umrechnen&quot; &lt;&lt;endl;
            cout &lt;&lt; &quot;----------------------&quot; &lt;&lt;endl;
            cout &lt;&lt; &quot; 1) Grad Celcius in Kelvin&quot;&lt;&lt;endl;
            cout &lt;&lt; &quot; 2) Kelvin in Grad Celcius&quot;&lt;&lt;endl;
            cout &lt;&lt; &quot; Bitte w&quot;&lt;&lt;ae&lt;&lt;&quot;hlen Sie Ihre gew&quot;&lt;&lt;ue&lt;&lt;&quot;nschte Option aus (1-2): &quot;;
            cin &gt;&gt; tempauswahl;

            if(tempauswahl &gt; 2 || tempauswahl &lt; 1)
            {
             fehleingabe();
            }
            else
            {      
              if(tempauswahl == 1)
              {
               system(&quot;cls&quot;);
               cout &lt;&lt; &quot; Grad Celcius in Kelvin&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot;------------------------&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot; Bitte geben Sie die Temperatur in Celcius an: &quot;;
               cin &gt;&gt; temp;
               cout &lt;&lt; &quot; Die Temperatur in Kelvin betr&quot;&lt;&lt;ae&lt;&lt;&quot;gt &quot; &lt;&lt; temp - 273 &lt;&lt; &quot;.&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; M&quot;&lt;&lt;oe&lt;&lt;&quot;chten Sie noch noch eine Umrechnung durchf&quot;&lt;&lt;ue&lt;&lt;&quot;hren? (j/n)&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; Dr&quot;&lt;&lt;ue&lt;&lt;&quot;cken Sie H um zum Hauptmen&quot;&lt;&lt;ue&lt;&lt;&quot; zur&quot;&lt;&lt;ue&lt;&lt;&quot;ck zu kehren.&quot;;
               wiederholen = getch();
                    if(wiederholen == 'j' || wiederholen == 'J')
                    {
                     goto temperaturmenue;         //Sprung zu Waehrungsgemenue
                    }
                    if(wiederholen == 'h' || wiederholen == 'H')
                    {
                     goto hauptmenue;
                    }
                    else if(wiederholen == 'n' || wiederholen == 'N')
                    {
                     danke();
                    }
              }
              else if(tempauswahl == 2)
              {
               system(&quot;cls&quot;);
               cout &lt;&lt; &quot; Kelvin in Grad Celcius&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot;------------------------&quot; &lt;&lt;endl;
               cout &lt;&lt; &quot; Bitte geben Sie die Temperatur in Kelvin an: &quot;;
               cin &gt;&gt; temp;
               cout &lt;&lt; &quot; Die Temperatur in Celcius betr&quot;&lt;&lt;ae&lt;&lt;&quot;gt &quot; &lt;&lt; temp + 273 &lt;&lt; &quot;.&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; M&quot;&lt;&lt;oe&lt;&lt;&quot;chten Sie noch noch eine Umrechnung durchf&quot;&lt;&lt;ue&lt;&lt;&quot;hren? (j/n)&quot;&lt;&lt;endl;
               cout &lt;&lt; &quot; Dr&quot;&lt;&lt;ue&lt;&lt;&quot;cken Sie H um zum Hauptmen&quot;&lt;&lt;ue&lt;&lt;&quot; zur&quot;&lt;&lt;ue&lt;&lt;&quot;ck zu kehren.&quot;;
               wiederholen = getch();
                    if(wiederholen == 'j' || wiederholen == 'J')
                    {
                     goto temperaturmenue;         //Sprung zu Waehrungsgemenue
                    }
                    if(wiederholen == 'h' || wiederholen == 'H')
                    {
                     goto hauptmenue;
                    }
                    else if(wiederholen == 'n' || wiederholen == 'N')
                    {
                     danke();
                    }
              }
    } 
           }
</code></pre>
<p>Oh mein Gott, was ich da angestellt habe! Sorry, jetzt sollte es gehen!</p>
<p>Er überprüft ob die Eingabe nicht passt:</p>
<pre><code class="language-cpp">if(tempauswahl &gt; 2 || tempauswahl &lt; 1)
            {
             fehleingabe();
            }
            else
            {      
            //...
           }
</code></pre>
<p>Wenn Sie passt, dann macht er den eigentlichen Teil...</p>
<p>Lg Mentras</p>
<p>Tut mir leid nochmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733905</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733905</guid><dc:creator><![CDATA[Mentras]]></dc:creator><pubDate>Sun, 28 Jun 2009 01:51:46 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 01:55:47 GMT]]></title><description><![CDATA[<p>Nene, bin doch froh, das du mir hilfst! Danke, mal gucken obs jetzt funzt <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1733906</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733906</guid><dc:creator><![CDATA[shivan]]></dc:creator><pubDate>Sun, 28 Jun 2009 01:55:47 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 01:59:28 GMT]]></title><description><![CDATA[<p>Vielen Dank, jetzt funktioniert wirklich alles! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733907</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733907</guid><dc:creator><![CDATA[shivan]]></dc:creator><pubDate>Sun, 28 Jun 2009 01:59:28 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 02:01:17 GMT]]></title><description><![CDATA[<p>shivan schrieb:</p>
<blockquote>
<p>Vielen Dank, jetzt funktioniert wirklich alles! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
</blockquote>
<p>Wirklich? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":O"
      alt="😮"
    /></p>
<p>Wie ich mich freue <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>
<p>Muss mich nochmal echt entschuldigen, bin müde und hab dir da immer ein Wisch Wasch gegeben.</p>
<p>Schönen Tag noch,...ich geh mal ins Bett!</p>
<p>Lg Mentras</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1733908</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733908</guid><dc:creator><![CDATA[Mentras]]></dc:creator><pubDate>Sun, 28 Jun 2009 02:01:17 GMT</pubDate></item><item><title><![CDATA[Reply to Programm funktioniert nicht richtig on Sun, 28 Jun 2009 10:58:53 GMT]]></title><description><![CDATA[<p>Jo egal, jetzt funktioniert ja alles <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1733984</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1733984</guid><dc:creator><![CDATA[shivan]]></dc:creator><pubDate>Sun, 28 Jun 2009 10:58:53 GMT</pubDate></item></channel></rss>