<?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[Funktion mit Funktion koppeln? Komm nicht weiter]]></title><description><![CDATA[<p>Hallo,<br />
ich muss folgendes machen ich geb euch mal die Aufgabenstellung.<br />
Der Bisherige Code funktioniert einwandfrei.</p>
<p><strong>. Erweitern Sie den Taschenrechner aus der Aufgabe 4 so, dass er zusätzlich die Ergebnisse aller Rechenoperationen auf dem Bildschirm ausgibt. Programmieren Sie für die Ausgabe aller Ergebnisse eine zusätzliche Funktion, - Name: komplett().</strong></p>
<pre><code>/*################################################
e3_04.cpp
###############################################*/

#include &lt;iostream.h&gt;

float addition(float x, float y){
cout &lt;&lt;&quot;Das Ergebnis der Addition lautet: &quot;;
return (x+y);}

float subtraktion(float x, float y){
cout &lt;&lt;&quot;Das Ergebnis der Subtraktion lautet: &quot;;
return (x-y);}

float division(float x, float y) {
cout &lt;&lt;&quot;Das Ergebnis der Division lautet: &quot;;
return (x/y);}

float multiplikation(float x, float y) {
cout &lt;&lt;&quot;Das Ergebnis der Multiplikation lautet: &quot;;
return (x*y);}

float Zahl1, Zahl2;
char Rechenzeichen;

void main() {

cout &lt;&lt;&quot;Geben Sie bitte die erste Zahl ein: &quot;;
cin &gt;&gt; Zahl1;
cout &lt;&lt;&quot;Geben Sie bitte die zweite Zahl ein: &quot;;
cin &gt;&gt; Zahl2;
cout &lt;&lt;&quot;Geben Sie die Rechenoperation ein (+ - / *): &quot;;
cin &gt;&gt; Rechenzeichen;

switch(Rechenzeichen){

        case '+':
                cout&lt;&lt;addition(Zahl1,Zahl2);
                break;
        case '-':
                cout&lt;&lt;subtraktion(Zahl1, Zahl2);
                break;
        case '/':
                cout&lt;&lt;division(Zahl1, Zahl2);
                break;
        case '*':
                cout&lt;&lt;multiplikation(Zahl1, Zahl2);
                break;

        default:
                cout&lt;&lt;&quot;Diese Rechenoperation gibt es nicht!&quot;;
                break;

}

char p[50];
cin.getline(p,50);
cin.getline(p,50);

}
</code></pre>
<p>ich habe alles versucht aber ich hab KEINE AHNUNG wie ich die anderen funktionen in diese funktion reinkrieg.<br />
Hab sogar versucht die Funktionen in der Funktion nochmal zu Programmieren aber funktioniert auch nicht.<br />
Hab auch so versucht</p>
<pre><code>cout &lt;&lt; addition(float x,float y);
cout &lt;&lt; addition();
cout &lt;&lt; addition(Zahl1, Zahl2);
</code></pre>
<p>Hoffe ihr könnt mir helfen.</p>
<p>Das Programm sollte bei der Ausgabe so aussehen.</p>
<p>Geben Sie bitte die erste Zahl ein:<br />
Geben Sie bitte die zweite Zahl ein:<br />
Geben Sie die Rechenoperation ein: (+ - * /):<br />
Das Ergebnis der Division lautet:</p>
<p><strong>Alle berechnungen:<br />
Das Ergebnis der Addition lautet:<br />
Das Ergebnis der Subtraktion lautet:<br />
Das Ergebnis der Division lautet:<br />
Das Ergebnis der Multiplikation lautet:</strong></p>
<p>Der fette Teil ist die neue Funktion! (Nur halt mit Berechnungen)</p>
<p>Thx schonmal</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/192197/funktion-mit-funktion-koppeln-komm-nicht-weiter</link><generator>RSS for Node</generator><lastBuildDate>Sun, 27 Sep 2026 09:20:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/192197.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 11 Sep 2007 15:20:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Funktion mit Funktion koppeln? Komm nicht weiter on Tue, 11 Sep 2007 15:20:35 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich muss folgendes machen ich geb euch mal die Aufgabenstellung.<br />
Der Bisherige Code funktioniert einwandfrei.</p>
<p><strong>. Erweitern Sie den Taschenrechner aus der Aufgabe 4 so, dass er zusätzlich die Ergebnisse aller Rechenoperationen auf dem Bildschirm ausgibt. Programmieren Sie für die Ausgabe aller Ergebnisse eine zusätzliche Funktion, - Name: komplett().</strong></p>
<pre><code>/*################################################
e3_04.cpp
###############################################*/

#include &lt;iostream.h&gt;

float addition(float x, float y){
cout &lt;&lt;&quot;Das Ergebnis der Addition lautet: &quot;;
return (x+y);}

float subtraktion(float x, float y){
cout &lt;&lt;&quot;Das Ergebnis der Subtraktion lautet: &quot;;
return (x-y);}

float division(float x, float y) {
cout &lt;&lt;&quot;Das Ergebnis der Division lautet: &quot;;
return (x/y);}

float multiplikation(float x, float y) {
cout &lt;&lt;&quot;Das Ergebnis der Multiplikation lautet: &quot;;
return (x*y);}

float Zahl1, Zahl2;
char Rechenzeichen;

void main() {

cout &lt;&lt;&quot;Geben Sie bitte die erste Zahl ein: &quot;;
cin &gt;&gt; Zahl1;
cout &lt;&lt;&quot;Geben Sie bitte die zweite Zahl ein: &quot;;
cin &gt;&gt; Zahl2;
cout &lt;&lt;&quot;Geben Sie die Rechenoperation ein (+ - / *): &quot;;
cin &gt;&gt; Rechenzeichen;

switch(Rechenzeichen){

        case '+':
                cout&lt;&lt;addition(Zahl1,Zahl2);
                break;
        case '-':
                cout&lt;&lt;subtraktion(Zahl1, Zahl2);
                break;
        case '/':
                cout&lt;&lt;division(Zahl1, Zahl2);
                break;
        case '*':
                cout&lt;&lt;multiplikation(Zahl1, Zahl2);
                break;

        default:
                cout&lt;&lt;&quot;Diese Rechenoperation gibt es nicht!&quot;;
                break;

}

char p[50];
cin.getline(p,50);
cin.getline(p,50);

}
</code></pre>
<p>ich habe alles versucht aber ich hab KEINE AHNUNG wie ich die anderen funktionen in diese funktion reinkrieg.<br />
Hab sogar versucht die Funktionen in der Funktion nochmal zu Programmieren aber funktioniert auch nicht.<br />
Hab auch so versucht</p>
<pre><code>cout &lt;&lt; addition(float x,float y);
cout &lt;&lt; addition();
cout &lt;&lt; addition(Zahl1, Zahl2);
</code></pre>
<p>Hoffe ihr könnt mir helfen.</p>
<p>Das Programm sollte bei der Ausgabe so aussehen.</p>
<p>Geben Sie bitte die erste Zahl ein:<br />
Geben Sie bitte die zweite Zahl ein:<br />
Geben Sie die Rechenoperation ein: (+ - * /):<br />
Das Ergebnis der Division lautet:</p>
<p><strong>Alle berechnungen:<br />
Das Ergebnis der Addition lautet:<br />
Das Ergebnis der Subtraktion lautet:<br />
Das Ergebnis der Division lautet:<br />
Das Ergebnis der Multiplikation lautet:</strong></p>
<p>Der fette Teil ist die neue Funktion! (Nur halt mit Berechnungen)</p>
<p>Thx schonmal</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363446</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363446</guid><dc:creator><![CDATA[G-Kasmo]]></dc:creator><pubDate>Tue, 11 Sep 2007 15:20:35 GMT</pubDate></item><item><title><![CDATA[Reply to Funktion mit Funktion koppeln? Komm nicht weiter on Tue, 11 Sep 2007 15:26:48 GMT]]></title><description><![CDATA[<p>hast du verstanden was ne funktion ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363449</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363449</guid><dc:creator><![CDATA[mht]]></dc:creator><pubDate>Tue, 11 Sep 2007 15:26:48 GMT</pubDate></item><item><title><![CDATA[Reply to Funktion mit Funktion koppeln? Komm nicht weiter on Tue, 11 Sep 2007 18:09:47 GMT]]></title><description><![CDATA[<p>So sollte es bei dir funktionieren, normal werden hier aber keine Hausaufgaben gelöst. Ein Wunder dass das bei dir überhaupt kompiliert hat.</p>
<pre><code class="language-cpp">/*################################################
e3_04.cpp
###############################################*/

#include &lt;iostream&gt;

using namespace std;

float addition(float x, float y){
cout &lt;&lt;&quot;Das Ergebnis der Addition lautet: &quot;;
return (x+y);}

float subtraktion(float x, float y){
cout &lt;&lt;&quot;Das Ergebnis der Subtraktion lautet: &quot;;
return (x-y);}

float division(float x, float y) {
cout &lt;&lt;&quot;Das Ergebnis der Division lautet: &quot;;
return (x/y);}

float multiplikation(float x, float y) {
cout &lt;&lt;&quot;Das Ergebnis der Multiplikation lautet: &quot;;
return (x*y);}

float Zahl1, Zahl2;
char Rechenzeichen;

void komplett(){
    cout &lt;&lt; &quot;Alle berechnungen:&quot; &lt;&lt; endl;
    cout &lt;&lt; addition(Zahl1, Zahl2) &lt;&lt; endl;
    cout &lt;&lt; subtraktion(Zahl1, Zahl2) &lt;&lt; endl;
    cout &lt;&lt; division(Zahl1, Zahl2) &lt;&lt; endl;
    cout &lt;&lt; multiplikation(Zahl1, Zahl2) &lt;&lt; endl;
}

int main() {

cout &lt;&lt;&quot;Geben Sie bitte die erste Zahl ein: &quot;;
cin &gt;&gt; Zahl1;
cout &lt;&lt;&quot;Geben Sie bitte die zweite Zahl ein: &quot;;
cin &gt;&gt; Zahl2;
cout &lt;&lt;&quot;Geben Sie die Rechenoperation ein (+ - / *): &quot;;
cin &gt;&gt; Rechenzeichen;

switch(Rechenzeichen){

        case '+':
                cout &lt;&lt; addition(Zahl1,Zahl2) &lt;&lt; endl;
                break;
        case '-':
                cout &lt;&lt; subtraktion(Zahl1, Zahl2) &lt;&lt; endl;
                break;
        case '/':
                cout &lt;&lt; division(Zahl1, Zahl2) &lt;&lt; endl;
                break;
        case '*':
                cout &lt;&lt; multiplikation(Zahl1, Zahl2) &lt;&lt; endl;
                break;

        default:
                cout&lt;&lt;&quot;Diese Rechenoperation gibt es nicht!&quot; &lt;&lt; endl;
                break;

}
cout &lt;&lt; endl;

komplett();

char p[50];
cin.getline(p,50);
cin.getline(p,50);

return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1363557</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363557</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 11 Sep 2007 18:09:47 GMT</pubDate></item><item><title><![CDATA[Reply to Funktion mit Funktion koppeln? Komm nicht weiter on Tue, 11 Sep 2007 19:13:18 GMT]]></title><description><![CDATA[<blockquote>
<p>Ein Wunder dass das bei dir überhaupt kompiliert hat.</p>
</blockquote>
<p>ja bei mir läuft alles einwandfrei ohne fehler.</p>
<blockquote>
<p>using namespace std;</p>
</blockquote>
<p>soweit bin ich noch nicht mim fernstudium <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="😉"
    /> kenn ich noch net die funktion..</p>
<blockquote>
<p>float Zahl1, Zahl2;<br />
char Rechenzeichen;</p>
<p>void komplett(){<br />
cout &lt;&lt; &quot;Alle berechnungen:&quot; &lt;&lt; endl;<br />
cout &lt;&lt; addition(Zahl1, Zahl2) &lt;&lt; endl;<br />
cout &lt;&lt; subtraktion(Zahl1, Zahl2) &lt;&lt; endl;<br />
cout &lt;&lt; division(Zahl1, Zahl2) &lt;&lt; endl;<br />
cout &lt;&lt; multiplikation(Zahl1, Zahl2) &lt;&lt; endl;</p>
</blockquote>
<p>ja mein fehler war das ich Zahl1 und Zahl2 vorher nicht deklariert habe.<br />
Thx jungs.</p>
<p>Sind ja nicht wirklich hausaufgaben aber bevor ich da ne email an die Fernlehrer schreib frag ich lieber hier weil des schneller geht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363604</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363604</guid><dc:creator><![CDATA[G-Kasmo]]></dc:creator><pubDate>Tue, 11 Sep 2007 19:13:18 GMT</pubDate></item><item><title><![CDATA[Reply to Funktion mit Funktion koppeln? Komm nicht weiter on Tue, 11 Sep 2007 19:19:49 GMT]]></title><description><![CDATA[<p>//EDIT<br />
(muss mich ma anmelden hier hehe ^^ scheiss neuer beitrag schreiben is ja voll der spam)</p>
<p>ja ich bin ja noch grad in der lernphase von c++..ich muss erstmal mit dem ganzen standard kram anfangen, und dann kommt des mit usind namespace std usw noch hab ich gesehn is aber noch 1 heft weiter ^^.</p>
<p>zu dem andern:</p>
<p>ich hab schon verstanden was ne funktion ist, hab nur verpeilt das ich Zahl1 und Zahl2 vorher deklarieren und einer variablen zuweisen sollte..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363608</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363608</guid><dc:creator><![CDATA[G-Kasmo]]></dc:creator><pubDate>Tue, 11 Sep 2007 19:19:49 GMT</pubDate></item><item><title><![CDATA[Reply to Funktion mit Funktion koppeln? Komm nicht weiter on Tue, 11 Sep 2007 20:19:31 GMT]]></title><description><![CDATA[<p>is ja kein Beinbruch, ich bin selbst noch Anfänger auch wenn ich schon länger hier registriert bin aber ich habe mich davon nur ein paar Wochen mit C++ auseinandergesetzt, bin aber durch Assembler auf dem alten Amiga und PHP schon etwas vorbelastet, naja egal aufjedenfall solltest du dich anmelden macht einfach einen besseren Eindruck.</p>
<p>Gruß Chris</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1363654</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1363654</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 11 Sep 2007 20:19:31 GMT</pubDate></item></channel></rss>