<?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[Problem mit&#x27;n Taschenrechner]]></title><description><![CDATA[<p>Warum läuft das so nicht?</p>
<pre><code class="language-cpp">//--------------Moduldatein, Headerdatein oder Programmbiblotheken--------------
#include&lt;iostream.h&gt;			//enthält Programme für cin und cout
#include&lt;conio.h&gt;          //enthält Programme wie getch oder clrscr
#include&lt;math.h&gt;           //für mathematische Berechnungen nötig
#include&lt;stdio.h&gt;          //für standart Ein- und Ausgaben
#include&lt;iomanip.h&gt;

//----------------------------Globale Deklarationen-----------------------------
char op;
float zahl1,zahl2,summe;

//--------------------------------Hauptprogramm---------------------------------
void main()

	{
   clrscr();
   cout&lt;&lt;&quot;Geben sie ein welche Rechenart sie benutzen wollen: &quot;&lt;&lt;endl&lt;&lt;endl;
   cout&lt;&lt;&quot;(g)rundrechenarten&quot;&lt;&lt;endl&lt;&lt;&quot;(t)rigonomische &quot;;
   cout&lt;&lt;&quot;Funktion&quot;&lt;&lt;endl&lt;&lt;&quot;(p)otenzrechnung&quot;&lt;&lt;endl;
   cout&lt;&lt;&quot;(w)urzel&quot;&lt;&lt;endl&lt;&lt;&quot;(n)-te wurzel&quot;&lt;&lt;endl&lt;&lt;&quot;(k)ehrwert&quot;&lt;&lt;endl;
   cout&lt;&lt;&quot;(p)otenzrechnung&quot;&lt;&lt;endl&lt;&lt;&quot;(f)akultaet&quot;&lt;&lt;endl;
   cout&lt;&lt;&quot;(s)chaltjahrberechnung&quot;&lt;&lt;endl&lt;&lt;endl;
   cout&lt;&lt;&quot;Tippen Sie den Buchstaben fuer die Rechenart ein,&quot;&lt;&lt;endl;
   cout&lt;&lt;&quot;die sie benutzen wollen und bestaetigen Sie mit Enter: &quot;;
   cin&gt;&gt;op;
   //Ist das Hauptmenü durch welches man in die Rechenmenüs kommt.
   switch(op)
   	{
      case 'g': clrscr();
   	cout&lt;&lt;&quot;Hier kannst du mit den Grundrechenarten rechnen.&quot;&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;&quot;Du kannst: &quot;&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;&quot;addieren&quot;&lt;&lt;endl&lt;&lt;&quot;subtrahieren&quot;&lt;&lt;endl&lt;&lt;&quot;multiplizieren&quot;&lt;&lt;endl;
      cout&lt;&lt;&quot;dividieren&quot;&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;&quot;Gib die Rechenaufgabe ein: &quot;;
      cin&gt;&gt;zahl1&gt;&gt;op&gt;&gt;zahl2;
      //Ist das Rechenmenü für die Grundrechenarten.
   	switch(op)
      	{
   		case'+': cout&lt;&lt;endl&lt;&lt;zahl1+zahl2;break;
      	case'-': cout&lt;&lt;endl&lt;&lt;zahl1-zahl2;break;
      	case'*': cout&lt;&lt;endl&lt;&lt;zahl1*zahl2;break;
      	case'/': if (zahl2==0)
         	{
            cout&lt;&lt;endl&lt;&lt;&quot;Die Division durch 0 ist nicht moeglich, &quot;;
            cout&lt;&lt;&quot;geben sie eine neue Zahl ein&quot;;
            cin&gt;&gt;zahl2;
            }
                 cout&lt;&lt;endl&lt;&lt;zahl1/zahl2;break;
         case':': if (zahl2==0)
         	{
            cout&lt;&lt;endl&lt;&lt;&quot;Die Division durch 0 ist nicht moeglich, &quot;;
            cout&lt;&lt;&quot;bitte geben sie eine neue Zahl ein&quot;;
            cin&gt;&gt;zahl2;
            }
         	       cout&lt;&lt;endl&lt;&lt;zahl1/zahl2;break;
		break;
      }
         //Hier sind die Rechnungen für die Grundrechenarten
      {
      case't': clrscr();
      cout&lt;&lt;&quot;Hier kannst du mit Trigonomischen Funktionen rechnen.&quot;&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;&quot;Du kannst folgende Funktionen benutzen: &quot;&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;&quot;sin(s)&quot;&lt;&lt;endl&lt;&lt;&quot;cos(c)&quot;&lt;&lt;endl&lt;&lt;&quot;tan(t)&quot;&lt;&lt;endl&lt;&lt;&quot;ctg(g)&quot;&lt;&lt;endl;
      cout&lt;&lt;endl&lt;&lt;&quot;Tipp erst den Buchstaben der Funktion ein,&quot;&lt;&lt;endl;
      cout&lt;&lt;&quot;die du benutzen willst, dann die Zahl die berechnet&quot;&lt;&lt;endl;
      cout&lt;&lt;&quot;werden soll und bestätige dann mit Enter&quot;;
      cin&gt;&gt;op&gt;&gt;zahl1
      //Ist das Rechenmenü für Trigonomischen Funktionen.
      switch(op)
      	{
         case's': cout&lt;&lt;endl&lt;&lt;sin(zahl1);break;
         case'c': cout&lt;&lt;endl&lt;&lt;cos(zahl1);break;
         case't': cout&lt;&lt;endl&lt;&lt;tan(zahl1);break;
         }
      break;
         //Hier sind die Rechnungen der Trigonomischen Funktionen
      }

	getch();
   }
</code></pre>
<p>Hier kann man die cpp auch nochmal <a href="http://www.mitglied.lycos.de/bretzeljunge/Daten/Rechner.CPP" rel="nofollow">Downloaden</a></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/94656/problem-mit-n-taschenrechner</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 09:43:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/94656.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 11 Dec 2004 13:00:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit&#x27;n Taschenrechner on Sat, 11 Dec 2004 13:00:51 GMT]]></title><description><![CDATA[<p>Warum läuft das so nicht?</p>
<pre><code class="language-cpp">//--------------Moduldatein, Headerdatein oder Programmbiblotheken--------------
#include&lt;iostream.h&gt;			//enthält Programme für cin und cout
#include&lt;conio.h&gt;          //enthält Programme wie getch oder clrscr
#include&lt;math.h&gt;           //für mathematische Berechnungen nötig
#include&lt;stdio.h&gt;          //für standart Ein- und Ausgaben
#include&lt;iomanip.h&gt;

//----------------------------Globale Deklarationen-----------------------------
char op;
float zahl1,zahl2,summe;

//--------------------------------Hauptprogramm---------------------------------
void main()

	{
   clrscr();
   cout&lt;&lt;&quot;Geben sie ein welche Rechenart sie benutzen wollen: &quot;&lt;&lt;endl&lt;&lt;endl;
   cout&lt;&lt;&quot;(g)rundrechenarten&quot;&lt;&lt;endl&lt;&lt;&quot;(t)rigonomische &quot;;
   cout&lt;&lt;&quot;Funktion&quot;&lt;&lt;endl&lt;&lt;&quot;(p)otenzrechnung&quot;&lt;&lt;endl;
   cout&lt;&lt;&quot;(w)urzel&quot;&lt;&lt;endl&lt;&lt;&quot;(n)-te wurzel&quot;&lt;&lt;endl&lt;&lt;&quot;(k)ehrwert&quot;&lt;&lt;endl;
   cout&lt;&lt;&quot;(p)otenzrechnung&quot;&lt;&lt;endl&lt;&lt;&quot;(f)akultaet&quot;&lt;&lt;endl;
   cout&lt;&lt;&quot;(s)chaltjahrberechnung&quot;&lt;&lt;endl&lt;&lt;endl;
   cout&lt;&lt;&quot;Tippen Sie den Buchstaben fuer die Rechenart ein,&quot;&lt;&lt;endl;
   cout&lt;&lt;&quot;die sie benutzen wollen und bestaetigen Sie mit Enter: &quot;;
   cin&gt;&gt;op;
   //Ist das Hauptmenü durch welches man in die Rechenmenüs kommt.
   switch(op)
   	{
      case 'g': clrscr();
   	cout&lt;&lt;&quot;Hier kannst du mit den Grundrechenarten rechnen.&quot;&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;&quot;Du kannst: &quot;&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;&quot;addieren&quot;&lt;&lt;endl&lt;&lt;&quot;subtrahieren&quot;&lt;&lt;endl&lt;&lt;&quot;multiplizieren&quot;&lt;&lt;endl;
      cout&lt;&lt;&quot;dividieren&quot;&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;&quot;Gib die Rechenaufgabe ein: &quot;;
      cin&gt;&gt;zahl1&gt;&gt;op&gt;&gt;zahl2;
      //Ist das Rechenmenü für die Grundrechenarten.
   	switch(op)
      	{
   		case'+': cout&lt;&lt;endl&lt;&lt;zahl1+zahl2;break;
      	case'-': cout&lt;&lt;endl&lt;&lt;zahl1-zahl2;break;
      	case'*': cout&lt;&lt;endl&lt;&lt;zahl1*zahl2;break;
      	case'/': if (zahl2==0)
         	{
            cout&lt;&lt;endl&lt;&lt;&quot;Die Division durch 0 ist nicht moeglich, &quot;;
            cout&lt;&lt;&quot;geben sie eine neue Zahl ein&quot;;
            cin&gt;&gt;zahl2;
            }
                 cout&lt;&lt;endl&lt;&lt;zahl1/zahl2;break;
         case':': if (zahl2==0)
         	{
            cout&lt;&lt;endl&lt;&lt;&quot;Die Division durch 0 ist nicht moeglich, &quot;;
            cout&lt;&lt;&quot;bitte geben sie eine neue Zahl ein&quot;;
            cin&gt;&gt;zahl2;
            }
         	       cout&lt;&lt;endl&lt;&lt;zahl1/zahl2;break;
		break;
      }
         //Hier sind die Rechnungen für die Grundrechenarten
      {
      case't': clrscr();
      cout&lt;&lt;&quot;Hier kannst du mit Trigonomischen Funktionen rechnen.&quot;&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;&quot;Du kannst folgende Funktionen benutzen: &quot;&lt;&lt;endl&lt;&lt;endl;
      cout&lt;&lt;&quot;sin(s)&quot;&lt;&lt;endl&lt;&lt;&quot;cos(c)&quot;&lt;&lt;endl&lt;&lt;&quot;tan(t)&quot;&lt;&lt;endl&lt;&lt;&quot;ctg(g)&quot;&lt;&lt;endl;
      cout&lt;&lt;endl&lt;&lt;&quot;Tipp erst den Buchstaben der Funktion ein,&quot;&lt;&lt;endl;
      cout&lt;&lt;&quot;die du benutzen willst, dann die Zahl die berechnet&quot;&lt;&lt;endl;
      cout&lt;&lt;&quot;werden soll und bestätige dann mit Enter&quot;;
      cin&gt;&gt;op&gt;&gt;zahl1
      //Ist das Rechenmenü für Trigonomischen Funktionen.
      switch(op)
      	{
         case's': cout&lt;&lt;endl&lt;&lt;sin(zahl1);break;
         case'c': cout&lt;&lt;endl&lt;&lt;cos(zahl1);break;
         case't': cout&lt;&lt;endl&lt;&lt;tan(zahl1);break;
         }
      break;
         //Hier sind die Rechnungen der Trigonomischen Funktionen
      }

	getch();
   }
</code></pre>
<p>Hier kann man die cpp auch nochmal <a href="http://www.mitglied.lycos.de/bretzeljunge/Daten/Rechner.CPP" rel="nofollow">Downloaden</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/670853</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/670853</guid><dc:creator><![CDATA[Snow]]></dc:creator><pubDate>Sat, 11 Dec 2004 13:00:51 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit&#x27;n Taschenrechner on Sat, 11 Dec 2004 15:29:31 GMT]]></title><description><![CDATA[<p>&quot;Läuft nicht&quot; ist keine ausreichende Problembeschreibung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/670956</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/670956</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Sat, 11 Dec 2004 15:29:31 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit&#x27;n Taschenrechner on Sat, 11 Dec 2004 15:40:30 GMT]]></title><description><![CDATA[<p>Also er findet beim Kompilieren folgende Fehler:</p>
<p>&quot;Ambiguous operators need parenthese&quot;<br />
&quot;Ambiguous operators need parenthese&quot;<br />
&quot;Unreachable code&quot;<br />
&quot;Statement missing ;&quot;<br />
&quot;Compound statement missing }&quot;</p>
<p>Könnt euch ja mal die 3kb große cpp saugen und selber Kompilieren lassen.</p>
<p>Danke schonmal für die hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/670965</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/670965</guid><dc:creator><![CDATA[Snow]]></dc:creator><pubDate>Sat, 11 Dec 2004 15:40:30 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit&#x27;n Taschenrechner on Sat, 11 Dec 2004 16:00:20 GMT]]></title><description><![CDATA[<p>Vielleicht bequemst du dich ja mal selbst noch ein bischen, der Sache auf den Grund zu gehen.<br />
Sieh dir an, in welcher Zeile die Fehler auftreten und wie der Code in der unmittelbaren Umgebung aussieht (auch davor!). Und dann halt noch die üblichen Prüfungen, z.B. ob jede (geschweifte) Klammer ihr Gegenstück hat usw.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/670968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/670968</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Sat, 11 Dec 2004 16:00:20 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit&#x27;n Taschenrechner on Sat, 11 Dec 2004 16:04:53 GMT]]></title><description><![CDATA[<p>Hab ich gemacht, wenn ich was gefunden hätte, hät ich euch ja nicht um Hilfe geboten. <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="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/670972</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/670972</guid><dc:creator><![CDATA[Snow]]></dc:creator><pubDate>Sat, 11 Dec 2004 16:04:53 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit&#x27;n Taschenrechner on Sat, 11 Dec 2004 16:09:23 GMT]]></title><description><![CDATA[<p>Mach's nochmal, aber gründlich, und beachte meine o.g. Hinweise.<br />
Und wenn du bei einer Fehlermeldung nicht weiterkommst dann kümmere dich erstmal um die nächste.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/670974</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/670974</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Sat, 11 Dec 2004 16:09:23 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit&#x27;n Taschenrechner on Sun, 12 Dec 2004 14:06:59 GMT]]></title><description><![CDATA[<p>so geht's bei mir:</p>
<pre><code class="language-cpp">//--------------Moduldatein, Headerdatein oder Programmbiblotheken--------------
#include&lt;iostream.h&gt;            //enthält Programme für cin und cout
#include&lt;conio.h&gt;          //enthält Programme wie getch oder clrscr
#include&lt;math.h&gt;           //für mathematische Berechnungen nötig
#include&lt;stdio.h&gt;          //für stan**** Ein- und Ausgaben
#include&lt;iomanip.h&gt;

//----------------------------Globale Deklarationen-----------------------------
char op;
float zahl1,zahl2,summe;

//--------------------------------Hauptprogramm---------------------------------
void main()
{
   clrscr();
   cout&lt;&lt;&quot;Geben sie ein welche Rechenart sie benutzen wollen: &quot;&lt;&lt;endl&lt;&lt;endl;
   cout&lt;&lt;&quot;(g)rundrechenarten&quot;&lt;&lt;endl&lt;&lt;&quot;(t)rigonomische &quot;;
   cout&lt;&lt;&quot;Funktion&quot;&lt;&lt;endl&lt;&lt;&quot;(p)otenzrechnung&quot;&lt;&lt;endl;
   cout&lt;&lt;&quot;(w)urzel&quot;&lt;&lt;endl&lt;&lt;&quot;(n)-te wurzel&quot;&lt;&lt;endl&lt;&lt;&quot;(k)ehrwert&quot;&lt;&lt;endl; 
   cout&lt;&lt;&quot;(p)otenzrechnung&quot;&lt;&lt;endl&lt;&lt;&quot;(f)akultaet&quot;&lt;&lt;endl; 
   cout&lt;&lt;&quot;(s)chaltjahrberechnung&quot;&lt;&lt;endl&lt;&lt;endl; 
   cout&lt;&lt;&quot;Tippen Sie den Buchstaben fuer die Rechenart ein,&quot;&lt;&lt;endl; 
   cout&lt;&lt;&quot;die sie benutzen wollen und bestaetigen Sie mit Enter: &quot;;
   cin&gt;&gt;op; 
   //Ist das Hauptmenü durch welches man in die Rechenmenüs kommt. 
   switch(op)
       {
        case 'g': clrscr();
        {
         cout&lt;&lt;&quot;Hier kannst du mit den Grundrechenarten rechnen.&quot;&lt;&lt;endl&lt;&lt;endl;
         cout&lt;&lt;&quot;Du kannst: &quot;&lt;&lt;endl&lt;&lt;endl;
         cout&lt;&lt;&quot;addieren&quot;&lt;&lt;endl&lt;&lt;&quot;subtrahieren&quot;&lt;&lt;endl&lt;&lt;&quot;multiplizieren&quot;&lt;&lt;endl;
         cout&lt;&lt;&quot;dividieren&quot;&lt;&lt;endl&lt;&lt;endl;
         cout&lt;&lt;&quot;Gib die Rechenaufgabe ein: &quot;;
         cin&gt;&gt;zahl1&gt;&gt;op&gt;&gt;zahl2;
         //Ist das Rechenmenü für die Grundrechenarten.
         switch(op)
         {
           case'+': cout&lt;&lt;endl&lt;&lt;zahl1+zahl2;break;
           case'-': cout&lt;&lt;endl&lt;&lt;zahl1-zahl2;break;
           case'*': cout&lt;&lt;endl&lt;&lt;zahl1*zahl2;break;
           case'/': if (zahl2==0)
           {
            cout&lt;&lt;endl&lt;&lt;&quot;Die Division durch 0 ist nicht moeglich, &quot;;
            cout&lt;&lt;&quot;geben sie eine neue Zahl ein&quot;;
            cin&gt;&gt;zahl2;
            cout&lt;&lt;endl&lt;&lt;zahl1/zahl2;break;
           }
           case':': if (zahl2==0)
           {
            cout&lt;&lt;endl&lt;&lt;&quot;Die Division durch 0 ist nicht moeglich, &quot;;
            cout&lt;&lt;&quot;bitte geben sie eine neue Zahl ein&quot;;
            cin&gt;&gt;zahl2;
            cout&lt;&lt;endl&lt;&lt;zahl1/zahl2;break;
           }
         }
         break;
        }
         //Hier sind die Rechnungen für die Grundrechenarten
        case't': clrscr();
        {
         cout&lt;&lt;&quot;Hier kannst du mit Trigonomischen Funktionen rechnen.&quot;&lt;&lt;endl&lt;&lt;endl;
         cout&lt;&lt;&quot;Du kannst folgende Funktionen benutzen: &quot;&lt;&lt;endl&lt;&lt;endl;
         cout&lt;&lt;&quot;sin(s)&quot;&lt;&lt;endl&lt;&lt;&quot;cos(c)&quot;&lt;&lt;endl&lt;&lt;&quot;tan(t)&quot;&lt;&lt;endl&lt;&lt;&quot;ctg(g)&quot;&lt;&lt;endl;
         cout&lt;&lt;endl&lt;&lt;&quot;Tipp erst den Buchstaben der Funktion ein,&quot;&lt;&lt;endl;
         cout&lt;&lt;&quot;die du benutzen willst, dann die Zahl die berechnet&quot;&lt;&lt;endl;
         cout&lt;&lt;&quot;werden soll und bestätige dann mit Enter&quot;;
         cin&gt;&gt;op&gt;&gt;zahl1;
         //Ist das Rechenmenü für Trigonomischen Funktionen.
         switch(op)
         {
          case's': cout&lt;&lt;endl&lt;&lt;sin(zahl1);break;
          case'c': cout&lt;&lt;endl&lt;&lt;cos(zahl1);break;
          case't': cout&lt;&lt;endl&lt;&lt;tan(zahl1);break;
         }
         break;
        }
         //Hier sind die Rechnungen der Trigonomischen Funktionen
       }
    getch();
   }
</code></pre>
<p>Aber der Benutzer wird abwechselnd gesiezt und geduzt...</p>
<p>-kaljinka-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/671576</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/671576</guid><dc:creator><![CDATA[Kaljinka]]></dc:creator><pubDate>Sun, 12 Dec 2004 14:06:59 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit&#x27;n Taschenrechner on Sun, 12 Dec 2004 18:21:33 GMT]]></title><description><![CDATA[<p>Dank dir. Ich bin jetzt eigentlich fertig und es hatte auch soweit alles funktioniert dann hab ich ein wenig den code aufgeräumt und jetzt hat der nen Problem bei den Grundrechenarten, der zeigt das Ergebnis nicht mehr an. <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="😞"
    /></p>
<p>Und bei den anderen Rechenfunktionen klappt die Schleife nicht mehr.<br />
Ich hab schon geschaut aber nix gefunden.</p>
<p>Ihr könnt euch die cpp hier runterladen <a href="http://www.mitglied.lycos.de/bretzeljunge/Daten/rechner.cpp" rel="nofollow">Download</a></p>
<p>hier ist der code:</p>
<pre><code class="language-cpp">//--------------Moduldatein, Headerdatein oder Programmbiblotheken--------------
#include&lt;iostream&gt;            //enthält Programme für cin und cout
#include&lt;conio.h&gt;          //enthält Programme wie getch oder clrscr
#include&lt;math.h&gt;           //für mathematische Berechnungen nötig
#include&lt;iomanip&gt;
#include &lt;stdio.h&gt;
//using namespace std;
//void clrscr(){}

//----------------------------Globale Deklarationen-----------------------------
float zahl1,zahl2,summe,ergebnis;
int Jahr,faku,zahl,i, op;
bool neg;

//--------------------------------Hauptprogramm---------------------------------
int main()
{
    while(1){ //Hauptmenü durch welches man in die Rechenmenüs kommt
        clrscr();
        cout&lt;&lt;&quot;Geben sie ein welche Rechenart sie benutzen wollen: &quot;&lt;&lt;endl;
        cout&lt;&lt;endl&lt;&lt;&quot;(1)Grundrechenarten&quot;&lt;&lt;endl&lt;&lt;&quot;(2)Trigonomische &quot;;
        cout&lt;&lt;&quot;Funktion&quot;&lt;&lt;endl&lt;&lt;&quot;(3)Prozentrechnung&quot;&lt;&lt;endl;
        cout&lt;&lt;&quot;(4)Wurzel&quot;&lt;&lt;endl&lt;&lt;&quot;(5)n-te wurzel&quot;&lt;&lt;endl&lt;&lt;&quot;(6)Kehrwert&quot;&lt;&lt;endl;
        cout&lt;&lt;&quot;(7)Potenzrechnung&quot;&lt;&lt;endl&lt;&lt;&quot;(8)Fakultaet&quot;&lt;&lt;endl;
        cout&lt;&lt;&quot;(9)Schaltjahrberechnung&quot;&lt;&lt;endl&lt;&lt;&quot;(10)Quadrieren&quot;&lt;&lt;endl;
        cout&lt;&lt;&quot;(11)natuerlicher Logarithmus (ln)&quot;&lt;&lt;endl;
        cout&lt;&lt;&quot;(12)Zehnerlogarithmus(log)&quot;&lt;&lt;endl&lt;&lt;endl;
        cout&lt;&lt;&quot;Tippen Sie die Zahl fuer die Rechenart ein,&quot;&lt;&lt;endl;
        cout&lt;&lt;&quot;die sie benutzen wollen und bestaetigen Sie mit Enter: &quot;;
        cin&gt;&gt;op;

        switch(op)
        {
            case 1: //Grundrechenarten
            clrscr();
            cout&lt;&lt;&quot;Hier kannst du mit den Grundrechenarten rechnen.&quot;&lt;&lt;endl;
            cout&lt;&lt;endl&lt;&lt;&quot;Du kannst: &quot;&lt;&lt;endl&lt;&lt;endl;
            cout&lt;&lt;&quot;addieren&quot;&lt;&lt;endl&lt;&lt;&quot;subtrahieren&quot;&lt;&lt;endl&lt;&lt;&quot;multiplizieren&quot;;
            cout&lt;&lt;endl&lt;&lt;&quot;dividieren&quot;&lt;&lt;endl&lt;&lt;endl;
            cout&lt;&lt;&quot;Gib die Rechenaufgabe ein: &quot;;
            cin&gt;&gt;zahl1&gt;&gt;op&gt;&gt;zahl2;

            switch(op)
            {
                case'+':
                cout&lt;&lt;endl&lt;&lt;zahl1+zahl2;
                break;
                case'-':
                cout&lt;&lt;endl&lt;&lt;zahl1-zahl2;
                break;
                case'*':
                cout&lt;&lt;endl&lt;&lt;zahl1*zahl2;
                break;
                case'/':
                if (zahl2==0)
                {
                    cout&lt;&lt;endl&lt;&lt;&quot;Die Division durch 0 ist nicht moeglich, &quot;;
                    cout&lt;&lt;&quot;geben sie eine neue Zahl ein&quot;;
                    cin&gt;&gt;zahl2;
                }
                cout&lt;&lt;endl&lt;&lt;zahl1/zahl2;
                break;
                case':':
                if (zahl2==0)
                {
                    cout&lt;&lt;endl&lt;&lt;&quot;Die Division durch 0 ist nicht moeglich, &quot;;
                    cout&lt;&lt;&quot;bitte geben sie eine neue Zahl ein&quot;;
                    cin&gt;&gt;zahl2;
                }
                cout&lt;&lt;endl&lt;&lt;zahl1/zahl2;break;
                break;
            }
            break;

            case 2: //Trigonomische Funktionen
            clrscr();
            cout&lt;&lt;&quot;Hier kannst du mit Trigonomischen Funktionen rechnen.&quot;&lt;&lt;endl;
            cout&lt;&lt;endl&lt;&lt;&quot;Du kannst folgende Funktionen benutzen: &quot;&lt;&lt;endl&lt;&lt;endl;
            cout&lt;&lt;&quot;sin(s)&quot;&lt;&lt;endl&lt;&lt;&quot;cos(c)&quot;&lt;&lt;endl&lt;&lt;&quot;tan(t)&quot;&lt;&lt;endl&lt;&lt;&quot;ctg(g)&quot;;
            cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;&quot;Tipp erst den Buchstaben der Funktion ein,&quot;;
            cout&lt;&lt;endl&lt;&lt;&quot;die du benutzen willst, dann die Zahl die berechnet&quot;;
            cout&lt;&lt;endl&lt;&lt;&quot;werden soll und bestätige dann mit Enter: &quot;;
            cin&gt;&gt;op&gt;&gt;zahl1;
            //Ist das Rechenmenü für Trigonomischen Funktionen.
            switch(op)
            {
                case's': cout&lt;&lt;endl&lt;&lt;sin(zahl1);break;
                case'c': cout&lt;&lt;endl&lt;&lt;cos(zahl1);break;
                case't': cout&lt;&lt;endl&lt;&lt;tan(zahl1);break;
                case'g': cout&lt;&lt;endl&lt;&lt;1/tan(zahl1);break;
            }
            break;

            case 7: //Potenzrechnung
            clrscr();
            ergebnis=1;
            cout&lt;&lt;&quot;Rechnung eingeben (x^y; Nur natürliche Zahlen benutzen):&quot;;
            cin&gt;&gt;zahl1&gt;&gt;op&gt;&gt;zahl2;
            zahl2=int(zahl2);
            neg=false;
            if(zahl2&lt;0){
                neg=true;
                zahl2*=-1;
            }
            while(zahl2){
                ergebnis*=zahl1;
                zahl2--;
            }
            if(neg)ergebnis=1/ergebnis;
            cout&lt;&lt;endl&lt;&lt;ergebnis;
            break;

            case 9: //SChaltjahrberechnung
            clrscr();
            cout&lt;&lt;&quot;Geben Sie das Jahr ein: &quot;;
   			cin&gt;&gt;Jahr;
   			if(Jahr%400==0)
   			cout&lt;&lt;endl&lt;&lt;&quot;Dies ist ein Schaltjahr!&quot;;
   			else if (Jahr%4==0&amp;&amp;Jahr%100!=0)
            cout&lt;&lt;endl&lt;&lt;&quot;Dies ist ein Schaltjahr!&quot;;
 				else cout&lt;&lt;endl&lt;&lt;&quot;Das ist kein Schaltjahr!&quot;;
            break;

            case 6: //Kehrwert
            clrscr();
            cout&lt;&lt;&quot;Gib die Zahl ein von der du den Kehrwert bilden willst: &quot;;
            cin&gt;&gt;zahl1;
            cout&lt;&lt;endl&lt;&lt;&quot;Das Ergebnis ist: &quot;&lt;&lt;1/zahl1;
            break;

            case 8: //Fakultät
            clrscr();
            printf(&quot;Bitte geben sie die Zahl ein von der sie die Fakultaet&quot;);
            printf(&quot;berechnen wollen: &quot;);
  				scanf(&quot;%d&quot;,&amp;zahl);
  				faku =1;

 			   for(i=1;i&lt;=zahl;i=i+1)
  				{
 					faku =faku*i;
  					printf(&quot;%d \n&quot;,faku);
  				}
  				printf(&quot;\n Die Fakultaet ist: %d&quot;,faku);
            break;

            case 4: //Wurzel
            clrscr();
            cout&lt;&lt;&quot;Gib die Zahl ein von der du die Wurzel ziehen möchtest: &quot;;
            cin&gt;&gt;zahl1;
            cout&lt;&lt;endl&lt;&lt;&quot;Das Ergebnis ist: &quot;&lt;&lt;sqrt(zahl1);
            break;

            case 10: //Quadrat
            clrscr();
            cout&lt;&lt;&quot;Geben sie die Zahl ein die quadriert werden soll: &quot;;
            cin&gt;&gt;zahl1;
            cout&lt;&lt;endl&lt;&lt;&quot;Das Ergebnis beträgt: &quot;&lt;&lt;pow(zahl1,2);
            break;

            case 3: //Prozentrechnung
            clrscr();
            cout&lt;&lt;&quot;Hier kannst du mit Prozent rechnen, tipp zuerst den &quot;;
            cout&lt;&lt;&quot;Prozentsatz ein und dann den Grundwert um den &quot;;
            cout&lt;&lt;&quot;Prozentwert zu erhalten: &quot;;
            cin&gt;&gt;zahl1&gt;&gt;zahl2;
            cout&lt;&lt;&quot;Der Prozentwert beträgt: &quot;&lt;&lt;zahl1*zahl2/100&lt;&lt;&quot;%&quot;;
            break;

            case 5: //n-te Wurzel
            clrscr();
            cout&lt;&lt;&quot;Berechnung der n-ten Wurzel aus x.&quot;&lt;&lt;endl&lt;&lt;&quot;n: &quot;;
				cin&gt;&gt;zahl1;
				cout&lt;&lt;endl&lt;&lt;&quot;x: &quot;;
				cin&gt;&gt;zahl2;
            cout&lt;&lt;pow(zahl2,1/zahl1);
            break;

            case 11: //Logarythmus(ln)
            clrscr();
            cout&lt;&lt;&quot;Hier kannst du natürlichen Logarythmus berrechnen &quot;&lt;&lt;endl;
            cout&lt;&lt;&quot;Gib die gewuenschte Zahl ein: &quot;;
            cin&gt;&gt;zahl1;
            cout&lt;&lt;endl&lt;&lt;&quot;Das Ergebnis ist: &quot;&lt;&lt;log(zahl1);
            break;

            case 12: //Zehnerlogarythmus(log)
            clrscr();
            cout&lt;&lt;&quot;Hier kannst du den Zehnerlogarythmus berrechnen &quot;&lt;&lt;endl;
        		cout&lt;&lt;&quot;Gib die gewuenschte zahl ein: &quot;;
            cin&gt;&gt;zahl1;
            cout&lt;&lt;endl&lt;&lt;&quot;Das Ergebnis ist: &quot;&lt;&lt;log10(zahl1);
            break;
        }
        cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;&quot;Zurueck zum Hauptmenue? (j)a, (n)ein &quot;;
        cin&gt;&gt;op;
        if(op=='n')break;

    }
    return 0;
}
</code></pre>
<p>Danke schonmal für die Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/671787</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/671787</guid><dc:creator><![CDATA[Snow]]></dc:creator><pubDate>Sun, 12 Dec 2004 18:21:33 GMT</pubDate></item></channel></rss>