<?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 läuft nicht]]></title><description><![CDATA[<p>Hi Leute,<br />
wer weiß warum das folgende Programm nicht läuft? Steh grad total aufm Schlauch.</p>
<p>Gruß Eddie</p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;
#include &lt;iomanip.h&gt;
#include &lt;stdio.h&gt;
#include &lt;math.h&gt;
#include &lt;conio.h&gt;

int berechnung(float kredit, float zinsen, float monatsrate, bool tabelle);

int main ()
{
  int zeit;
  float kredit, zinssatz, rate;
  char ausgabe;
  bool janein=false;

  cout &lt;&lt; &quot;Kredithoehe: &quot;;
  cin &gt;&gt; kredit;
  cout &lt;&lt; &quot;Jahreszinssatz: &quot;;
  cin &gt;&gt; zinssatz;
  cout &lt;&lt; &quot;monatliche Rueckzahlungsrate: &quot;;
  cin &gt;&gt; rate;
  cout &lt;&lt; &quot;Wuenschen Sie eine tabellarische Ausgabe? &quot;;
  cin &gt;&gt; ausgabe;
  ausgabe = toupper(ausgabe);

  if (ausgabe =='J')
     janein = true;

  zeit = berechnung(kredit,zinssatz/12.0,rate,janein);

  if (janein==false)
     cout &lt;&lt; &quot;Der Kredit ist nach &quot; &lt;&lt; zeit &lt;&lt; &quot; Monaten abbezahlt.&quot;;

  getch ();
  return 0;
}

int berechnung(float kredit, float zinsen, float monatsrate, bool tabelle)
{
  int monate=0;
  float zinsanteil, tilgungsanteil;

  kredit+= kredit*zinsen/100.0;

  if (tabelle)
     cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; endl
          &lt;&lt; &quot;----------------------------------------------&quot; &lt;&lt; endl
          &lt;&lt; &quot;Monate    Zinsanteil   Tilgungsanteil   Kredit&quot; &lt;&lt; endl
          &lt;&lt; &quot;----------------------------------------------&quot; &lt;&lt; endl;

  while (kredit&gt;=monatsrate)
  {
     ++monate;

     zinsanteil = kredit*zinsen/100.0;
     tilgungsanteil = kredit-monatsrate+zinsanteil;
     kredit -= zinsanteil-monatsrate;

     if (tabelle)
         cout &lt;&lt; setw(6) &lt;&lt; monate &lt;&lt; setw(14) &lt;&lt; zinsanteil &lt;&lt; setw(17)
              &lt;&lt; tilgungsanteil &lt;&lt; setw(9) &lt;&lt; kredit &lt;&lt; endl;

  }

  if (kredit!=0)
  {
     ++monate;
     if (tabelle)
        cout &lt;&lt; setw(6) &lt;&lt; monate &lt;&lt; &quot;   Restbetrag:  &quot; &lt;&lt; kredit;
  }
  return monate;
}
</code></pre>
<p><strong>Edit:</strong><br />
Bitte die <a href="http://www.c-plusplus.net/forum/faq.php?mode=bbcode" rel="nofollow">Code-Tags</a> verwenden. Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/151360/programm-läuft-nicht</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 12:09:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/151360.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 25 Jun 2006 17:48:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Programm läuft nicht on Sun, 25 Jun 2006 19:16:42 GMT]]></title><description><![CDATA[<p>Hi Leute,<br />
wer weiß warum das folgende Programm nicht läuft? Steh grad total aufm Schlauch.</p>
<p>Gruß Eddie</p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;
#include &lt;iomanip.h&gt;
#include &lt;stdio.h&gt;
#include &lt;math.h&gt;
#include &lt;conio.h&gt;

int berechnung(float kredit, float zinsen, float monatsrate, bool tabelle);

int main ()
{
  int zeit;
  float kredit, zinssatz, rate;
  char ausgabe;
  bool janein=false;

  cout &lt;&lt; &quot;Kredithoehe: &quot;;
  cin &gt;&gt; kredit;
  cout &lt;&lt; &quot;Jahreszinssatz: &quot;;
  cin &gt;&gt; zinssatz;
  cout &lt;&lt; &quot;monatliche Rueckzahlungsrate: &quot;;
  cin &gt;&gt; rate;
  cout &lt;&lt; &quot;Wuenschen Sie eine tabellarische Ausgabe? &quot;;
  cin &gt;&gt; ausgabe;
  ausgabe = toupper(ausgabe);

  if (ausgabe =='J')
     janein = true;

  zeit = berechnung(kredit,zinssatz/12.0,rate,janein);

  if (janein==false)
     cout &lt;&lt; &quot;Der Kredit ist nach &quot; &lt;&lt; zeit &lt;&lt; &quot; Monaten abbezahlt.&quot;;

  getch ();
  return 0;
}

int berechnung(float kredit, float zinsen, float monatsrate, bool tabelle)
{
  int monate=0;
  float zinsanteil, tilgungsanteil;

  kredit+= kredit*zinsen/100.0;

  if (tabelle)
     cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; endl
          &lt;&lt; &quot;----------------------------------------------&quot; &lt;&lt; endl
          &lt;&lt; &quot;Monate    Zinsanteil   Tilgungsanteil   Kredit&quot; &lt;&lt; endl
          &lt;&lt; &quot;----------------------------------------------&quot; &lt;&lt; endl;

  while (kredit&gt;=monatsrate)
  {
     ++monate;

     zinsanteil = kredit*zinsen/100.0;
     tilgungsanteil = kredit-monatsrate+zinsanteil;
     kredit -= zinsanteil-monatsrate;

     if (tabelle)
         cout &lt;&lt; setw(6) &lt;&lt; monate &lt;&lt; setw(14) &lt;&lt; zinsanteil &lt;&lt; setw(17)
              &lt;&lt; tilgungsanteil &lt;&lt; setw(9) &lt;&lt; kredit &lt;&lt; endl;

  }

  if (kredit!=0)
  {
     ++monate;
     if (tabelle)
        cout &lt;&lt; setw(6) &lt;&lt; monate &lt;&lt; &quot;   Restbetrag:  &quot; &lt;&lt; kredit;
  }
  return monate;
}
</code></pre>
<p><strong>Edit:</strong><br />
Bitte die <a href="http://www.c-plusplus.net/forum/faq.php?mode=bbcode" rel="nofollow">Code-Tags</a> verwenden. Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085304</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085304</guid><dc:creator><![CDATA[dernetteeddie1978]]></dc:creator><pubDate>Sun, 25 Jun 2006 19:16:42 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Sun, 25 Jun 2006 17:59:22 GMT]]></title><description><![CDATA[<p>Jepp, ich weiß es.<br />
Aber was hast Du denn schon versucht um es raus zu finden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085315</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085315</guid><dc:creator><![CDATA[Phips!]]></dc:creator><pubDate>Sun, 25 Jun 2006 17:59:22 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Sun, 25 Jun 2006 19:54:38 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>- was hat dein Code/dein Problem mit dem Builder zu tun? Du verwendest nichts aus der Builder-spezifischen VCl, sondern reines Standard-C++</p>
<p>- was genau soll dein Programm machen und was bedeutet <em>warum das folgende Programm nicht läuft</em>?</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085324</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085324</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sun, 25 Jun 2006 19:54:38 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Sun, 25 Jun 2006 19:18:45 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=437" rel="nofollow">Jansen</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=2" rel="nofollow">VCL/CLX (Borland C++ Builder)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085394</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085394</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sun, 25 Jun 2006 19:18:45 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Sun, 25 Jun 2006 20:05:53 GMT]]></title><description><![CDATA[<pre><code>while (kredit&gt;=monatsrate)
  {
     ++monate;

     zinsanteil = kredit*zinsen/100.0;
     tilgungsanteil = kredit-monatsrate+zinsanteil;
     kredit -= zinsanteil-monatsrate;

     if (tabelle)
         cout &lt;&lt; setw(6) &lt;&lt; monate &lt;&lt; setw(14) &lt;&lt; zinsanteil &lt;&lt; setw(17)
              &lt;&lt; tilgungsanteil &lt;&lt; setw(9) &lt;&lt; kredit &lt;&lt; endl;

  }
</code></pre>
<p>Das gibt eine endlosschleife. Der Debugger hilft manchmal Wunder.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085426</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085426</guid><dc:creator><![CDATA[raimond]]></dc:creator><pubDate>Sun, 25 Jun 2006 20:05:53 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Sun, 25 Jun 2006 21:33:59 GMT]]></title><description><![CDATA[<p>raimond schrieb:</p>
<blockquote>
<p>Der Debugger hilft manchmal Wunder.</p>
</blockquote>
<p>Nein, ncoch viel öfter. f'`8k</p>
<p>Bye, TGGC (<a href="http://tggc.tg.funpic.de/index.php" rel="nofollow">\-/ returns</a>)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085468</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085468</guid><dc:creator><![CDATA[TGGC]]></dc:creator><pubDate>Sun, 25 Jun 2006 21:33:59 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Sun, 25 Jun 2006 21:48:18 GMT]]></title><description><![CDATA[<p>dernetteeddie1978 schrieb:</p>
<blockquote>
<p>Hi Leute,<br />
wer weiß warum das folgende Programm nicht läuft?</p>
</blockquote>
<p>&quot;Das Program läuft nicht&quot; ... ist keine fehlerbeschreibung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085479</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085479</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Sun, 25 Jun 2006 21:48:18 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Sun, 25 Jun 2006 23:06:59 GMT]]></title><description><![CDATA[<p>@ Phips!:</p>
<p>Ei dann sags halt:) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>@ camper: ei es macht ne Endlosschleife, in Deinem Compiler bestimmt auch.</p>
<p>@ raimond: Wie geht denn das mit dem Debugger? Bin noch recht neu in der C++ Programmierung, und vor allem in dem Borland Compiler.</p>
<p>Gruß Eddie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085497</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085497</guid><dc:creator><![CDATA[dernetteeddie1978]]></dc:creator><pubDate>Sun, 25 Jun 2006 23:06:59 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Sun, 25 Jun 2006 23:09:33 GMT]]></title><description><![CDATA[<p>@ raimond:</p>
<p>ICh dachte mir auch schon das dort der Fehler liegen muß, nur leider steh ich irgendwie völlig aufm Schlauch, da ich einfach nicht finden kann wo die Berechnungen nicht stimmen.</p>
<p>Gruß Eddie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085498</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085498</guid><dc:creator><![CDATA[dernetteeddie1978]]></dc:creator><pubDate>Sun, 25 Jun 2006 23:09:33 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Sun, 25 Jun 2006 23:12:17 GMT]]></title><description><![CDATA[<p>dernetteeddie1978 schrieb:</p>
<blockquote>
<p>@ camper: ei es macht ne Endlosschleife, in Deinem Compiler bestimmt auch.</p>
</blockquote>
<p>das ist immer noch sehr unpräzise. und compiliert und getestet habe ich das programm auch nicht.</p>
<pre><code class="language-cpp">kredit -= zinsanteil-monatsrate;
</code></pre>
<p>darüber solltest du noch einmal nachdenken.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085500</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085500</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Sun, 25 Jun 2006 23:12:17 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Mon, 26 Jun 2006 04:43:50 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/10628">@eddie</a>: du kennst den Unterschied zwischen endlichen Schleifen und<br />
Endlosschleifen?</p>
<p>Oder musst du gerade deine Festplatte zumüllen?</p>
<p>MfG f.-th.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085552</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085552</guid><dc:creator><![CDATA[f.-th.]]></dc:creator><pubDate>Mon, 26 Jun 2006 04:43:50 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Mon, 26 Jun 2006 09:03:02 GMT]]></title><description><![CDATA[<p>Zum debugge: <a href="http://www.junix.ch/bcb/help/debug.html" rel="nofollow">http://www.junix.ch/bcb/help/debug.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1085708</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1085708</guid><dc:creator><![CDATA[raimond]]></dc:creator><pubDate>Mon, 26 Jun 2006 09:03:02 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Mon, 26 Jun 2006 16:41:01 GMT]]></title><description><![CDATA[<p>Schau dir den Tipp von Camper an. Und wenn Du schon solche Codeabkürzungen benutzt, dann mach dir vorher klar was sie bedeuten!</p>
<p>Dies</p>
<pre><code class="language-cpp">a-=b-c;
</code></pre>
<p>ist nämlich das Gleiche wie</p>
<pre><code class="language-cpp">a = a - (b-c);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1086131</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1086131</guid><dc:creator><![CDATA[Phips!]]></dc:creator><pubDate>Mon, 26 Jun 2006 16:41:01 GMT</pubDate></item><item><title><![CDATA[Reply to Programm läuft nicht on Mon, 26 Jun 2006 19:30:14 GMT]]></title><description><![CDATA[<p>Jepp, das wars. Vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1086325</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1086325</guid><dc:creator><![CDATA[dernetteeddie1978]]></dc:creator><pubDate>Mon, 26 Jun 2006 19:30:14 GMT</pubDate></item></channel></rss>