<?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[Vorstellung erster code tipps.]]></title><description><![CDATA[<p>Hallo zusammen, ich würde gern mal mein ersten code vorstellen, und dazu Tipp´s<br />
und kleine verbesserungen abholen.</p>
<p>Ich poste einfach mal den code <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
<pre><code>#include &lt;iostream&gt;

void plus();
void minus();
void mal();
void geteilt();

using namespace std;

int main()
{
	char Taschenrechner;

	cout &lt;&lt; &quot;Taschenrechner Waehle eine Zahl und druecke Enter\n&quot;
		 &lt;&lt; &quot;\t1.Plus +\n&quot;
		 &lt;&lt; &quot;\t2.Minus -\n&quot;
		 &lt;&lt; &quot;\t3.Mal *\n&quot;
		 &lt;&lt; &quot;\t4.Geteilt :\n&quot;
		 &lt;&lt; &quot;\t5.Bildschirm Leeren\n&quot;
		 &lt;&lt; &quot;\t6.Beenden\n&quot;;
		cin &gt;&gt; Taschenrechner;
		switch(Taschenrechner)
		{
			case '1':
				cout &lt;&lt; &quot;Plus +\n&quot;;
				plus();
				break;
			case '2':
				cout &lt;&lt; &quot;Minus -\n&quot;;
				minus();
				break;
			case '3':
				cout &lt;&lt; &quot;Mal *\n&quot;;
				mal();
				break;
			case '4':
				cout &lt;&lt; &quot;Geteilt :\n&quot;;
				geteilt();
				break;
			case '5':
				system(&quot;cls&quot;);
				main();
				break;
			case '6':
				return 0;
			default:
				cout &lt;&lt; &quot;Du hast keine Option Gewaehlt.&quot;;
		}
		cin.sync();
		cin.get();
		return 0;	
}

void plus()
{
	int zahl1, zahl2;
	cout &lt;&lt; &quot;Erste Zahl\n&quot;;
	cin &gt;&gt; zahl1;
	cout &lt;&lt; &quot;Zweite Zahl\n&quot;;
	cin &gt;&gt; zahl2;

	cout &lt;&lt; &quot;Ergebnis\n&quot; &lt;&lt; zahl1 + zahl2 &lt;&lt; endl;
	main();
}

void minus()
{
	int zahl1, zahl2;
	cout &lt;&lt; &quot;Erste Zahl\n&quot;;
	cin &gt;&gt; zahl1;
	cout &lt;&lt; &quot;Zweite Zahl\n&quot;;
	cin &gt;&gt; zahl2;

	cout &lt;&lt; &quot;Ergebnis\n&quot; &lt;&lt; zahl1 - zahl2 &lt;&lt; endl;
	main();
}

void mal()
{
	int zahl1, zahl2;
	cout &lt;&lt; &quot;Erste Zahl\n&quot;;
	cin &gt;&gt; zahl1;
	cout &lt;&lt; &quot;Zweite Zahl\n&quot;;
	cin &gt;&gt; zahl2;

	cout &lt;&lt; &quot;Ergebnis\n&quot; &lt;&lt; zahl1 * zahl2 &lt;&lt; endl;
	main();
}

void geteilt()
{
	int zahl1, zahl2;
	cout &lt;&lt; &quot;Erste Zahl\n&quot;;
	cin &gt;&gt; zahl1;
	cout &lt;&lt; &quot;Zweite Zahl\n&quot;;
	cin &gt;&gt; zahl2;

	cout &lt;&lt; &quot;Ergebnis\n&quot; &lt;&lt; zahl1 / zahl2 &lt;&lt; endl;
	main();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/323231/vorstellung-erster-code-tipps</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 09:14:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/323231.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Jan 2014 04:42:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Vorstellung erster code tipps. on Wed, 22 Jan 2014 04:42:51 GMT]]></title><description><![CDATA[<p>Hallo zusammen, ich würde gern mal mein ersten code vorstellen, und dazu Tipp´s<br />
und kleine verbesserungen abholen.</p>
<p>Ich poste einfach mal den code <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
<pre><code>#include &lt;iostream&gt;

void plus();
void minus();
void mal();
void geteilt();

using namespace std;

int main()
{
	char Taschenrechner;

	cout &lt;&lt; &quot;Taschenrechner Waehle eine Zahl und druecke Enter\n&quot;
		 &lt;&lt; &quot;\t1.Plus +\n&quot;
		 &lt;&lt; &quot;\t2.Minus -\n&quot;
		 &lt;&lt; &quot;\t3.Mal *\n&quot;
		 &lt;&lt; &quot;\t4.Geteilt :\n&quot;
		 &lt;&lt; &quot;\t5.Bildschirm Leeren\n&quot;
		 &lt;&lt; &quot;\t6.Beenden\n&quot;;
		cin &gt;&gt; Taschenrechner;
		switch(Taschenrechner)
		{
			case '1':
				cout &lt;&lt; &quot;Plus +\n&quot;;
				plus();
				break;
			case '2':
				cout &lt;&lt; &quot;Minus -\n&quot;;
				minus();
				break;
			case '3':
				cout &lt;&lt; &quot;Mal *\n&quot;;
				mal();
				break;
			case '4':
				cout &lt;&lt; &quot;Geteilt :\n&quot;;
				geteilt();
				break;
			case '5':
				system(&quot;cls&quot;);
				main();
				break;
			case '6':
				return 0;
			default:
				cout &lt;&lt; &quot;Du hast keine Option Gewaehlt.&quot;;
		}
		cin.sync();
		cin.get();
		return 0;	
}

void plus()
{
	int zahl1, zahl2;
	cout &lt;&lt; &quot;Erste Zahl\n&quot;;
	cin &gt;&gt; zahl1;
	cout &lt;&lt; &quot;Zweite Zahl\n&quot;;
	cin &gt;&gt; zahl2;

	cout &lt;&lt; &quot;Ergebnis\n&quot; &lt;&lt; zahl1 + zahl2 &lt;&lt; endl;
	main();
}

void minus()
{
	int zahl1, zahl2;
	cout &lt;&lt; &quot;Erste Zahl\n&quot;;
	cin &gt;&gt; zahl1;
	cout &lt;&lt; &quot;Zweite Zahl\n&quot;;
	cin &gt;&gt; zahl2;

	cout &lt;&lt; &quot;Ergebnis\n&quot; &lt;&lt; zahl1 - zahl2 &lt;&lt; endl;
	main();
}

void mal()
{
	int zahl1, zahl2;
	cout &lt;&lt; &quot;Erste Zahl\n&quot;;
	cin &gt;&gt; zahl1;
	cout &lt;&lt; &quot;Zweite Zahl\n&quot;;
	cin &gt;&gt; zahl2;

	cout &lt;&lt; &quot;Ergebnis\n&quot; &lt;&lt; zahl1 * zahl2 &lt;&lt; endl;
	main();
}

void geteilt()
{
	int zahl1, zahl2;
	cout &lt;&lt; &quot;Erste Zahl\n&quot;;
	cin &gt;&gt; zahl1;
	cout &lt;&lt; &quot;Zweite Zahl\n&quot;;
	cin &gt;&gt; zahl2;

	cout &lt;&lt; &quot;Ergebnis\n&quot; &lt;&lt; zahl1 / zahl2 &lt;&lt; endl;
	main();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2378877</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2378877</guid><dc:creator><![CDATA[Monster_l3]]></dc:creator><pubDate>Wed, 22 Jan 2014 04:42:51 GMT</pubDate></item><item><title><![CDATA[Reply to Vorstellung erster code tipps. on Wed, 22 Jan 2014 05:15:00 GMT]]></title><description><![CDATA[<p>Was passiert denn, wenn du vier mal gerechnet hast und dann beenden willst.<br />
Ist das Programm dann sofort zu Ende?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2378878</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2378878</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Wed, 22 Jan 2014 05:15:00 GMT</pubDate></item><item><title><![CDATA[Reply to Vorstellung erster code tipps. on Wed, 22 Jan 2014 07:41:44 GMT]]></title><description><![CDATA[<p>Monster_l3 schrieb:</p>
<blockquote>
<pre><code>case '5':
				system(&quot;cls&quot;);
				main();
				break;
			}
</code></pre>
</blockquote>
<p>Der Aufruf von system ist schlecht, der rekursive Aufruf von main ist tödlich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2378886</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2378886</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 22 Jan 2014 07:41:44 GMT</pubDate></item><item><title><![CDATA[Reply to Vorstellung erster code tipps. on Wed, 22 Jan 2014 08:17:38 GMT]]></title><description><![CDATA[<p>Bis auf die konkrete Rechenoperation sind die 4 Unterfunktionen alle identisch. Das geht besser. Versuch mal so wenig Code wie möglich zu verdoppeln, also die Eingabe der Operanden auszulagern.</p>
<p>Die main-Rekursion ... wie kommt man auf so eine Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2378890</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2378890</guid><dc:creator><![CDATA[qweasdyxc]]></dc:creator><pubDate>Wed, 22 Jan 2014 08:17:38 GMT</pubDate></item><item><title><![CDATA[Reply to Vorstellung erster code tipps. on Wed, 22 Jan 2014 08:31:51 GMT]]></title><description><![CDATA[<p>qweasdyxc schrieb:</p>
<blockquote>
<p>...<br />
Die main-Rekursion ... wie kommt man auf so eine Idee?</p>
</blockquote>
<p>Um ehrlich zu sein finde ich die Idee gar nicht schlecht. Intuitiv spricht ja erst ein Mal nichts dagegen, und woher soll man als Programmieranfänger denn wissen, dass der Standard das explizit verbietet?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2378891</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2378891</guid><dc:creator><![CDATA[DocShoe]]></dc:creator><pubDate>Wed, 22 Jan 2014 08:31:51 GMT</pubDate></item><item><title><![CDATA[Reply to Vorstellung erster code tipps. on Wed, 22 Jan 2014 13:38:28 GMT]]></title><description><![CDATA[<p>Zu erst mal danke DocShoe.<br />
Danke an die Flamer die ich eigentlich nicht gefragt hatte, es steht im titel Tipps und keine Flame´s.</p>
<p>Auser geflame von idioten sehe ich hier kein Vernünftigen Tipp und oder Rat.<br />
Es steht ja geschrieben das dies mein erster c++ code schnipsel, anstatt hier herumzu flamen wie ich darauf komme (qweasdyxc) hättest du oder jemand anders mal erklären können warum man es nicht benutzt.</p>
<p>An Belli du bist anscheinend auch zu dumm um beim scheissen zu Stinken, kretik<br />
ist gut aber wo ist der Tipp wie ich es hätte besser machen können ?</p>
<p>So nochmal zur Frage was kann man besser machen, bitte ein paar Tipps und Ratschläge und keine dummen leute mehr wie Belli und qweasdyxc.</p>
<p>GeZ<br />
MB</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2378946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2378946</guid><dc:creator><![CDATA[Monster_l3]]></dc:creator><pubDate>Wed, 22 Jan 2014 13:38:28 GMT</pubDate></item><item><title><![CDATA[Reply to Vorstellung erster code tipps. on Wed, 22 Jan 2014 13:44:35 GMT]]></title><description><![CDATA[<p>Monster_l3 schrieb:</p>
<blockquote>
<p>Zu erst mal danke DocShoe.<br />
Danke an die Flamer die ich eigentlich nicht gefragt hatte, es steht im titel Tipps und keine Flame´s.</p>
<p>Auser geflame von idioten sehe ich hier kein Vernünftigen Tipp und oder Rat.<br />
Es steht ja geschrieben das dies mein erster c++ code schnipsel, anstatt hier herumzu flamen wie ich darauf komme (qweasdyxc) hättest du oder jemand anders mal erklären können warum man es nicht benutzt.</p>
<p>An Belli du bist anscheinend auch zu dumm um beim scheissen zu Stinken, kretik<br />
ist gut aber wo ist der Tipp wie ich es hätte besser machen können ?</p>
<p>So nochmal zur Frage was kann man besser machen, bitte ein paar Tipps und Ratschläge und keine dummen leute mehr wie Belli und qweasdyxc.</p>
<p>GeZ<br />
MB</p>
</blockquote>
<p>Tickst Du noch ganz sauber?<br />
Keiner außer Dir hat hier geflamet Du unverschämtes dummes Kind.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2378947</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2378947</guid><dc:creator><![CDATA[qweasdyxc]]></dc:creator><pubDate>Wed, 22 Jan 2014 13:44:35 GMT</pubDate></item><item><title><![CDATA[Reply to Vorstellung erster code tipps. on Wed, 22 Jan 2014 13:44:48 GMT]]></title><description><![CDATA[<p>Das ist ein Tipp gewesen:<br />
Mach den rekursiven Aufruf von main() weg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2378948</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2378948</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Wed, 22 Jan 2014 13:44:48 GMT</pubDate></item><item><title><![CDATA[Reply to Vorstellung erster code tipps. on Wed, 22 Jan 2014 13:45:50 GMT]]></title><description><![CDATA[<p>Da es hier nur stinkende, dumme Scheißer gibt, kann ich den Thread auch schließen. Dann antworten sie dir wenigstens nicht und verletzen nicht dein zartes Gemüt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2378949</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2378949</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 22 Jan 2014 13:45:50 GMT</pubDate></item></channel></rss>