<?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[HILFE!!! Schleifen]]></title><description><![CDATA[<p>Also, den ersten Teil hab ich ja nun hingekriegt. Das Programm macht so lange weiter bis der User 0 eingibt. Aber dann will der Lehrer noch, dass die eingegebenen Zahlen zusammengezählt werden!!! Und dann ist bei mir schluss!<br />
Könnt ihr helfen???(Visual 6.0 c++)</p>
<p>vielen Dank<br />
Visual Newbie<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
<p>#include &lt;iostream&gt;<br />
using namespace std;</p>
<p>int main ()</p>
<p>{</p>
<p>char Eingabe;</p>
<p>do<br />
{<br />
cout &lt;&lt; &quot; Bitte geben Sie eine beliebige Zahl ein ! &quot; ;<br />
cin &gt;&gt; Eingabe;</p>
<p>}</p>
<p>while ( Eingabe &gt; '0' );</p>
<p>return 0;</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/126910/hilfe-schleifen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 22:08:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/126910.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 19 Nov 2005 19:35:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 19:35:23 GMT]]></title><description><![CDATA[<p>Also, den ersten Teil hab ich ja nun hingekriegt. Das Programm macht so lange weiter bis der User 0 eingibt. Aber dann will der Lehrer noch, dass die eingegebenen Zahlen zusammengezählt werden!!! Und dann ist bei mir schluss!<br />
Könnt ihr helfen???(Visual 6.0 c++)</p>
<p>vielen Dank<br />
Visual Newbie<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
<p>#include &lt;iostream&gt;<br />
using namespace std;</p>
<p>int main ()</p>
<p>{</p>
<p>char Eingabe;</p>
<p>do<br />
{<br />
cout &lt;&lt; &quot; Bitte geben Sie eine beliebige Zahl ein ! &quot; ;<br />
cin &gt;&gt; Eingabe;</p>
<p>}</p>
<p>while ( Eingabe &gt; '0' );</p>
<p>return 0;</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921680</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921680</guid><dc:creator><![CDATA[Visual Newbie]]></dc:creator><pubDate>Sat, 19 Nov 2005 19:35:23 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 19:51:02 GMT]]></title><description><![CDATA[<p>Des Ding was dein Lehrer will nennt sich Kumulative Summe oder so!</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main ()

{

char Eingabe;
double xyz=0; //Die Summe wird auf 0 gesetzt

do
{
cout &lt;&lt; &quot; Bitte geben Sie eine beliebige Zahl ein ! &quot; ;
cin &gt;&gt; Eingabe;
xyz=xyz+Eingabe; //Hier wird der jeweilige Eingegebene Wert zu der Summe dazu addiert

}

while ( Eingabe &gt; '0' );

cout&lt;&lt;xyz; //Zur Ausgabe der Summe
return 0;

}
</code></pre>
<p>EDIT:<br />
Wieso nimmst du da eigentlich char??? Char ist eigentlich für Buchstaben gedacht. Und Fußgesteuerte Schleifen sind nicht grad empfehlenswert.<br />
Hier mal ein anderer Code der vielleicht besser ist!</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main()
{
   double S=0; //S=Kumulative Summe
   cout&lt;&lt;&quot;Geben Sie einen Wert ein:\n&quot;;
   double Wert;
   cin&gt;&gt;Wert;
   while (Wert&gt;0)
   {
       S=S+Wert;
       cout&lt;&lt;&quot;Geben Sie einen Wert ein:\n&quot;;
       cin&gt;&gt;Wert;
   }
   cout&lt;&lt;S&lt;&lt;&quot;\n&quot;; //Gibt die kumulative Summe aus
   system (&quot;Pause&quot;); //Damit das Programm nicht nach der Ausgabe sofort schließt
   return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/921684</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921684</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 19:51:02 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 19:52:53 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Er gibt bei einer Eingabe von 1+1+1 195 aus?!?! Wie kommt das????<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/921696</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921696</guid><dc:creator><![CDATA[Visual Newbie]]></dc:creator><pubDate>Sat, 19 Nov 2005 19:52:53 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 19:56:08 GMT]]></title><description><![CDATA[<p>Ja weil du char statt int,double etc. genommen hast!<br />
gibts den irgendwelche Vorschriften oder soll das Programm nur die Aufgabe lösen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921698</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921698</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 19:56:08 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 19:57:37 GMT]]></title><description><![CDATA[<p>Bei deinem zweiten gings, danke....</p>
<p>nächstes Problem....</p>
<p>Hier sollen Noten der Schüler eingegeben werden, bis 0 eingegeben wird.<br />
Dann soll die Durchschnittsnote errechnet werden.....</p>
<p>Das mit den Variablen und Operatoren und so weiter ist mir immer noch nicht ganz klar..... Der Lehrer hat gesagt wir sollen char nehmen...?!?!</p>
<p>#include &lt;iostream&gt;<br />
using namespace std;</p>
<p>int main()</p>
<p>{</p>
<p>char Eingabe;</p>
<p>do<br />
{<br />
cout &lt;&lt; &quot; Geben Sie die Note des Schuelers ein ! &quot; ;<br />
cin &gt;&gt; Eingabe;</p>
<p>}</p>
<p>while ( Eingabe &gt; '0' ) ;</p>
<p>return 0;</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921700</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921700</guid><dc:creator><![CDATA[Visual Newbie]]></dc:creator><pubDate>Sat, 19 Nov 2005 19:57:37 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 19:59:19 GMT]]></title><description><![CDATA[<p>Nunja dann hat dein Lehrer ne Klatsche sorry ist aber so!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921701</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921701</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 19:59:19 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:01:12 GMT]]></title><description><![CDATA[<p>Sogar eingie meiner Schulkollegen wissen mehr ....<br />
Aber leider seh ich die nur alle 3 Wochen. Und nächste Schulwoch ist eine Arbeit zum Thema schleifen und ich kann gar nix... Die ganzen die Bücher die ich gekauft habe, bringen mich nicht weiter....</p>
<p>Kannst du mir bei der zweiten Aufgabe helfen?????</p>
<p><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/921702</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921702</guid><dc:creator><![CDATA[Visual Newbie]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:01:12 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:06:30 GMT]]></title><description><![CDATA[<p>Visual Newbie schrieb:</p>
<blockquote>
<p>Der Lehrer hat gesagt wir sollen char nehmen...?!?!</p>
</blockquote>
<p>dann nimm wenigstens unsigned char.<br />
edit: für die zweite aufgabe kannst du z.b. die eingaben zählen und dann bei der ausgabe die summe durch diese zahl teilen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921703</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921703</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:06:30 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:14:21 GMT]]></title><description><![CDATA[<p>So dürfte es funktionieren allerdings ohne char und ohne fußgesteuerte Schleife!</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main()
{
   double S=0; //S=Kumulative Summe
   double A=0; //A=Anzahl der Noten
   cout&lt;&lt;&quot;Geben Sie einen Note ein:\n&quot;;
   double Wert;
   cin&gt;&gt;Wert;
   S=S+Wert;
   A=A+1;
   while (Wert&gt;0)
   {
       cout&lt;&lt;&quot;Geben Sie die Note ein:\n&quot;;
       cin&gt;&gt;Wert;
       S=S+Wert;
       A=A+1;
   }
   double D; //Für Durchschnitt
   A=A-1;
   D=S/A;
   cout&lt;&lt;D&lt;&lt;&quot;\n&quot;; //Gibt den Durchschnitt aus
   system (&quot;Pause&quot;); //Damit das Programm nicht nach der Ausgabe sofort schließt
   return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/921709</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921709</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:14:21 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:19:07 GMT]]></title><description><![CDATA[<p>Hey Sascha du bist echt Hammer!<br />
Darf ich dich noch ein letztes mal (für Heute) Bemühen???</p>
<p>Die Aufgabe lautet PIN</p>
<p>Der User hat den Pin einzugeben. Wenn er Falsch ist dann kommt eine Fehlermeldung.<br />
Wenn er richtig ist, kommt er ans konto oder wohin auch immer....</p>
<p>Da hab ich noch gar nicht angefangen, weil meine Nerven nicht so stark sind....</p>
<p>PS: Was du schreibst klingt so furchtbar logisch, die Beispiele in den Büchern sind nicht so doll......</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921714</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921714</guid><dc:creator><![CDATA[Visual Newbie]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:19:07 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:19:15 GMT]]></title><description><![CDATA[<p>Sascha081088 schrieb:</p>
<blockquote>
<p>So dürfte es funktionieren allerdings ohne char und ohne fußgesteuerte Schleife!</p>
</blockquote>
<p>weil du keine fussgesteuerte schleife benutzt, haste dieses zeug:<br />
cout&lt;&lt;&quot;Geben Sie die Note ein:\n&quot;;<br />
cin&gt;&gt;Wert;<br />
S=S+Wert;<br />
A=A+1;<br />
zweimal im code.<br />
na, dann besser mit do...while</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921715</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921715</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:19:15 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:30:28 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main()
{
    cout&lt;&lt;&quot;Bitte geben Sie die PIN-Nr. ein:\n&quot;;
    int PIN; //Eingegebener PIN
    cin&gt;&gt;PIN;
    if (PIN==....) //.... da kommt der PIN hin den der User eingeben muss
    {
                   /* Hier kannst du dann das hinschreiben 
                   was passieren soll wenn der PIN richtig ist!*/
    }
    else
    {
        /* Hier kannst du dann das hinschreiben 
        was passieren soll wenn der PIN falsch ist!*/
    }
    system (&quot;Pause&quot;);
    return 0;
}
</code></pre>
<p>Kannst ruhig weiter fragen schaue neben bei DSDS ^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921723</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921723</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:30:28 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:34:57 GMT]]></title><description><![CDATA[<p>Das Programm soll, wenn der Pin falsch ist noch mal fragen....solange bis er richtig ist....</p>
<p>ich hoffe ich versteh das irgendwann....</p>
<p>Die 2 Aufgabe ist dann, eine max Pin Eingabe von 3 x dann kommt ein cout &lt;&lt; Ihre Karte wird jetzt eingezogen, oder so...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921728</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921728</guid><dc:creator><![CDATA[Visual Newbie]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:34:57 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:40:29 GMT]]></title><description><![CDATA[<p>Moment das benötigt ein wenig Zeit muss mal überlegen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921736</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921736</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:40:29 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:45:25 GMT]]></title><description><![CDATA[<pre><code>bool check_pin (PIN the_right_pin)
{
   int checks = 3;
   while (checks--)
   {
      if (getpin() == the_right_pin)
         return true;
   }
   return false;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/921739</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921739</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:45:25 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:49:43 GMT]]></title><description><![CDATA[<p>Nagut den versteh ich net also wird er ihn auch nicht verstehen!<br />
Hier meiner!</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main()
{
    int AdfeP=0; //Anzahl der falsch eingegeben Pins
    while (AdfeP&lt;=2)
    {
    cout&lt;&lt;&quot;Bitte geben Sie die PIN-Nr. ein:\n&quot;;
    int PIN; //Eingegebener PIN
    cin&gt;&gt;PIN;
    if (PIN==....) //.... da kommt der PIN hin den der User eingeben muss
    {
                   AdfeP==3; //Damit wird verhindert das die Schleife nochmals durchläuft!
                   /* Hier kannst du dann das hinschreiben
                   was passieren soll wenn der PIN richtig ist!*/
    }
    else
    {
        AdfeP++; //Hiermit wird gezählt wie oft der Pin schon falsch eingegeben wurde. Dabei bedeutet das ++ soviel wie +1
        if (AdfeP==3)
        {
                     cout&lt;&lt;&quot;Ihre Karte wird jetzt eingezogen!\n&quot;;
        }
    }
    }
    system (&quot;Pause&quot;);
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/921742</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921742</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:49:43 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:52:16 GMT]]></title><description><![CDATA[<p>Kann man das auch kuerzen??? Gegeben war auf dem Arbeitsblatt ein Kassenbon. Die Anwendung soll MwSt, Geg.Bar, Rueckgeld ausgeben. ICh habe ewig fuer gebraucht...</p>
<p>#include &lt;iostream&gt;<br />
using namespace std;</p>
<p>int main ()</p>
<p>{</p>
<p>//<em><strong><strong><strong><strong><strong>+ABSCHNITT 1</strong></strong></strong></strong></strong></em>******//*****************ABSCHNITT 1*******//<em><strong><strong><strong><strong><strong>ABSCHNITT 1<br />
//</strong></strong></strong></strong></strong></em>******************************************************************************************<br />
//***************** Auflistung der Waren und Berchnung des jeweiligen Preises**************************</p>
<p>// ************* Paprika Orange ****************</p>
<p>// Paprika Orange<br />
// Kilopreis 3.99 Euro</p>
<p>// Variablendeklaration<br />
double gewicht_paprika;<br />
double endpreis_paprika;</p>
<p>// Eingabe</p>
<p>cout &lt;&lt; &quot; Bitte Gewicht der Paprika eingeben ! &quot;;<br />
cin &gt;&gt; gewicht_paprika;</p>
<p>// Berechnung<br />
endpreis_paprika = 3.99 * gewicht_paprika;</p>
<p>// Ausgabe<br />
cout &lt;&lt; &quot; Preis Paprika &quot; &lt;&lt; endpreis_paprika &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// ************************ Knaeckebrot Sesam *************************************</p>
<p>// Berechnet den Gesamtpreis von Knaeckebrot<br />
// Stueckpreis 0.89</p>
<p>// Variablendeklaration<br />
double stueck_knaecke;<br />
double endpreis_knaecke;</p>
<p>// Eingabe<br />
cout &lt;&lt; &quot; \n\n\nBitte gekaufte Packungen Knaeckebrot eingeben ! &quot;;<br />
cin &gt;&gt; stueck_knaecke;</p>
<p>//Berechnung<br />
endpreis_knaecke = 0.89 * stueck_knaecke;</p>
<p>// Ausgabe<br />
cout &lt;&lt; &quot; Preis Knaeckbort &quot; &lt;&lt; endpreis_knaecke &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// ************************** Korb Johannisbeeren *********************************</p>
<p>// Berechnet den Preis von Korb Johannisbeeren<br />
// Einzelpreis 1.29 Euro</p>
<p>// Variablendeklaration<br />
double korb_johannisb;<br />
double endpreis_johannisb;</p>
<p>// Eingabe<br />
cout &lt;&lt; &quot; \n\n\nBitte eingeben wieviele Koerbe Johannisbeeren gekauft wurden! &quot;;<br />
cin &gt;&gt; korb_johannisb;</p>
<p>// Berechnung<br />
endpreis_johannisb = 1.29 * korb_johannisb;</p>
<p>// Ausgabe<br />
cout &lt;&lt; &quot; Preis Johannisbeeren &quot; &lt;&lt; endpreis_johannisb &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// *********************** Konfituere ***************************************</p>
<p>// Berechnet wieviel Glaeser Konfituere gekauft wurden<br />
// Einzelpreis 0.79</p>
<p>// Variablendeklaration<br />
double glas_gekauft;<br />
double endpreis_konfi;</p>
<p>// Eingabe<br />
cout &lt;&lt; &quot; \n\n\nBitte eingeben wieviele Glaeser Konituere \ngekauft wurden! &quot;;<br />
cin &gt;&gt; glas_gekauft;</p>
<p>// Berechnung<br />
endpreis_konfi = 0.79 * glas_gekauft;</p>
<p>// Ausgabe<br />
cout &lt;&lt; &quot; Preis Konfituere &quot; &lt;&lt; endpreis_konfi &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// **************************** Seife ********************************</p>
<p>// Berechnet wieviel Seife gekauft wurde<br />
//Einzelpreis 0.35</p>
<p>// Variablendeklaration<br />
double seife_gek;<br />
double endpreis_seife;</p>
<p>// Eingabe<br />
cout &lt;&lt; &quot; \n\n\nBitte eingeben wieviel Seife gekauft wurde ! &quot;;<br />
cin &gt;&gt; seife_gek;</p>
<p>// Berechnung<br />
endpreis_seife = 0.35 * seife_gek;</p>
<p>// Ausgabe<br />
cout &lt;&lt; &quot; Preis Seife &quot; &lt;&lt; endpreis_seife &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// **************************** Handseife ******************************************</p>
<p>// Berechnet den Preis von Handseife<br />
// Einzelpreis 0.49</p>
<p>// Variablendeklaration<br />
double hands_gek;<br />
double endpreis_hands;</p>
<p>// Eingabe<br />
cout &lt;&lt; &quot; \n\n\nBitte eingeben wieviel Handseife gekauft wurde ! &quot;;<br />
cin &gt;&gt; hands_gek;</p>
<p>// Berechnung<br />
endpreis_hands = 0.49 * hands_gek;</p>
<p>// Ausgabe<br />
cout &lt;&lt; &quot; Preis Handseife &quot; &lt;&lt; endpreis_hands &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// ******************************** Kaffeesahne ***********************</p>
<p>// Berechnet den Preis von Kaffeesahne<br />
// Einzelpreis 0.98</p>
<p>// Variablendeklaration<br />
double sahne_gek;<br />
double endpreis_sahne;</p>
<p>// Eingabe<br />
cout &lt;&lt; &quot; \n\n\nBitte eingeben wieviel Kaffeesahne Sie gekauft haben ! &quot;;<br />
cin &gt;&gt; sahne_gek;</p>
<p>// Berechnung<br />
endpreis_sahne = 0.98 * sahne_gek;</p>
<p>// Ausgabe<br />
cout &lt;&lt; &quot; Preis Kaffeesahne &quot; &lt;&lt; endpreis_sahne &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// ******************** Zitronen ************************************</p>
<p>// Berechnet den Preis von Zitronen<br />
// Kilopreis 1.29</p>
<p>// Variablendeklaration<br />
double zitro_gek;<br />
double endpreis_zitro;</p>
<p>// Eingabe<br />
cout &lt;&lt; &quot; \n\n\nBitte eingeben wieviel Kilo Zitronen Sie gekauft haben ! &quot;;<br />
cin &gt;&gt; zitro_gek;</p>
<p>// Berechnung<br />
endpreis_zitro = 1.29 * zitro_gek;</p>
<p>//Ausgabe<br />
cout &lt;&lt; &quot; Preis Zitronen &quot; &lt;&lt; endpreis_zitro &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// ********************ABSCHNITT 2 **************** // ******************ABSCHNITT 2 ******************<br />
// ************************** Hier wird der Gesamtpreis der gekauften Waren berechnet******************<br />
//*************************** Danach wird berechnet wieviel Rueckgeld nach Eingabe des Geg. Werts *******<br />
//*************************** ausgegeben werden muß ****************************************************</p>
<p>// Variablendeklaration<br />
double gesamtpreis;</p>
<p>gesamtpreis = endpreis_paprika + endpreis_knaecke + endpreis_johannisb + endpreis_konfi +<br />
endpreis_seife + endpreis_hands + endpreis_sahne + endpreis_zitro ;</p>
<p>cout &lt;&lt; &quot; \n\n\nBitte bezahlen Sie &quot; &lt;&lt; gesamtpreis &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// Variablendeklaration<br />
double gegeben_bar;<br />
double rueckgeld;</p>
<p>cout &lt;&lt; &quot; \nBitte Betrag eingeben mit dem Sie zahlen ! &quot; ;<br />
cin &gt;&gt; gegeben_bar;</p>
<p>rueckgeld = gegeben_bar - gesamtpreis;</p>
<p>cout &lt;&lt; &quot; \nIhr Rueckgeld betraegt &quot; &lt;&lt; rueckgeld &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// *************** ABSCHNITT 3 ************************* // *********************ABSCHNITT 3 *********<br />
// **************************** Hier wird die Mehrwertsteuer berechnet *******************************<br />
// *********************** Zuerst die 7 Prozent dann die 16 Prozent **********************************</p>
<p>//Berechnung der Mehrwertsteuer 7 Prozent<br />
// Variablendeklaration<br />
double mehrwertsteuer_gesamt_7_prozent;</p>
<p>mehrwertsteuer_gesamt_7_prozent = (endpreis_paprika * 7 / 100) + (endpreis_knaecke * 7 / 100)+<br />
(endpreis_johannisb * 7 / 100) + (endpreis_konfi * 7 / 100) + (endpreis_sahne * 7 / 100) +<br />
( endpreis_zitro * 7 / 100);</p>
<p>cout &lt;&lt; &quot;\n\n\nGesamtmehrwertsteuer 7 Prozent &quot; &lt;&lt; mehrwertsteuer_gesamt_7_prozent &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// Variablendeklaration<br />
double mehrwertsteuer_gesamt_16_prozent;</p>
<p>mehrwertsteuer_gesamt_16_prozent = (endpreis_seife * 7 / 100 ) + (endpreis_hands * 7 / 100 );</p>
<p>cout &lt;&lt; &quot; \nGesamtmehrwertsteuer 16 Prozent &quot; &lt;&lt; mehrwertsteuer_gesamt_16_prozent &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// Variablendeklaration<br />
double mehrwertsteuer;<br />
double nettopreis;</p>
<p>mehrwertsteuer = mehrwertsteuer_gesamt_7_prozent + mehrwertsteuer_gesamt_16_prozent;</p>
<p>cout &lt;&lt; &quot; \n\nInsgesamt bezahlte Mehrwertsteuer &quot; &lt;&lt; mehrwertsteuer &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>// **************** ABSCHNITT 4 ********************* // **************ABSCHNITT 4 ***********************<br />
// ************************** Berchnet noch den Nettopreis der Ware **************************************</p>
<p>nettopreis = gesamtpreis - mehrwertsteuer;</p>
<p>cout &lt;&lt; &quot; \n\n\nNettopreis &quot; &lt;&lt; nettopreis &lt;&lt; &quot; Euro &quot; &lt;&lt; endl;</p>
<p>return 0;</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921746</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921746</guid><dc:creator><![CDATA[Visual Newbie]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:52:16 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:56:30 GMT]]></title><description><![CDATA[<p>ok wenn du ICQ hast dann schreib mir denn so schaff ich das nie!<br />
341021861 meine Nummer</p>
<p>EDIT: Hab grad gemerkt das das Ding schon funktioniert was willst du noch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921751</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921751</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:56:30 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 20:59:46 GMT]]></title><description><![CDATA[<p>Ob man das Programm kuerzen kann...</p>
<p>Das ist echt viel Schreibarbeit...</p>
<p>Gibt es zum Beispiel die Möglichkeit Bestimmte Berechnungen auf einmal zu machen, dass man nicht jede Berechnung extra machen muß....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921758</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921758</guid><dc:creator><![CDATA[Visual Newbie]]></dc:creator><pubDate>Sat, 19 Nov 2005 20:59:46 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 21:07:08 GMT]]></title><description><![CDATA[<p>Seh ich keine Chance drin. Musst das so oder so schreiben! Du könntest allerdings an und versich manche Variablendeklarationen weglassen. Und andere einfach wieder überschreiben!</p>
<p>EDIT: Ehrlich gesagt finde ich das eine großartige leistung. Wäre da garnicht durchgestiegen ich würde es so lassen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921761</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921761</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 21:07:08 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 21:06:34 GMT]]></title><description><![CDATA[<p>was war jetzt noch mal mit do....</p>
<p>Warum brauch ich das nicht??</p>
<p>Wann verwende ich andere Angaben wie if oder ähnliches...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921762</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921762</guid><dc:creator><![CDATA[Visual Newbie]]></dc:creator><pubDate>Sat, 19 Nov 2005 21:06:34 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 21:08:50 GMT]]></title><description><![CDATA[<p>Visual Newbie schrieb:</p>
<blockquote>
<p>was war jetzt noch mal mit do....<br />
Warum brauch ich das nicht??</p>
</blockquote>
<p>lass dich nicht verwirren. das do...while ist schon ok so.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921763</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921763</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Sat, 19 Nov 2005 21:08:50 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 21:09:47 GMT]]></title><description><![CDATA[<p>Also do while ist ne fußgestuerte Schleife und ist in sofern scheiße weil du wenn du nen Durchschnitt errechen willst dann einen Wert mehr hast. Da ist eine while oder for schleife wesentlich besser. Allerdings ist es deine Entscheidung.<br />
Also if ist dafür da wenn du jetzt eine Entscheidung treffen willst. z.b. ist 0 mehr als 1. da brauchst du dann if und wenn es das ist was es natürlich nicht ist passiert was und wenn nicht dann passiert halt was anderes. Else gehört dazu genau wie else if.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921765</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921765</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 21:09:47 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 21:10:17 GMT]]></title><description><![CDATA[<p>Hast du noch LUst..????</p>
<p>Ich hätte da noch einiges....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921766</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921766</guid><dc:creator><![CDATA[Visual Newbie]]></dc:creator><pubDate>Sat, 19 Nov 2005 21:10:17 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 21:10:46 GMT]]></title><description><![CDATA[<p>net schrieb:</p>
<blockquote>
<p>Visual Newbie schrieb:</p>
<blockquote>
<p>was war jetzt noch mal mit do....<br />
Warum brauch ich das nicht??</p>
</blockquote>
<p>lass dich nicht verwirren. das do...while ist schon ok so.</p>
</blockquote>
<p>Das war ja klar als Interessen fressen, peeeep, fernsehen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921768</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921768</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 21:10:46 GMT</pubDate></item><item><title><![CDATA[Reply to HILFE!!! Schleifen on Sat, 19 Nov 2005 21:11:25 GMT]]></title><description><![CDATA[<p>Visual Newbie schrieb:</p>
<blockquote>
<p>Hast du noch LUst..????</p>
<p>Ich hätte da noch einiges....</p>
</blockquote>
<p>Kommt drauf an was! Hast du nicht ICQ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/921769</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/921769</guid><dc:creator><![CDATA[Sascha081088]]></dc:creator><pubDate>Sat, 19 Nov 2005 21:11:25 GMT</pubDate></item></channel></rss>