<?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[Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler]]></title><description><![CDATA[<p>Hallo, ich schreibe gerade ein kleines Programm (eher zum üben), wie auch immer, ich möchte, dass man am Anfang eingeben soll welche beiden Variablen man hat (z.b. Seite a und b) und dann die jeweilige if Funktion ausführen sollum den rest zu berechnen. Egal was ich eingebe, er geht immer gleich in die erste if Funktion hinein:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;cmath&gt;

using namespace std;

int main () {

    float a, b, c, h, alpha, beta, A, U, R;
    const float pi = 3.14159265359;
    char e='e',z='z';
    cin &gt;&gt; e &gt;&gt; z;

    if ('a' &amp;&amp; 'b') {
       cout &lt;&lt; &quot;bitte zuerst den Wert fuer a, dann den Wert fuer b eingeben \n&quot;;
          cin &gt;&gt; a &gt;&gt; b;
          c = sqrt (a*a+b*b);
          A = a*b/2;
          h = 2*A/c;
          U = a+b+c;
          R = c/2;
          alpha = (asin (a/c))*(360/(2*pi));
          beta = 90 - alpha;

          cout &lt;&lt; &quot;\n gegebene Werte: a= &quot; &lt;&lt; a &lt;&lt; &quot; ,b= &quot; &lt;&lt; b &lt;&lt; endl &lt;&lt; &quot;\n Die Seite c= &quot; &lt;&lt; c &lt;&lt; &quot;\n Die Hoehe= &quot; &lt;&lt; h &lt;&lt; &quot;\n Der Flaechninhalt= &quot;&lt;&lt; A &lt;&lt; &quot;\n Der Umfang = &quot; &lt;&lt; U &lt;&lt;
          &quot;\n Der Umkreisradius= &quot; &lt;&lt; R&lt;&lt; &quot;\n Der Winkel Alpha= &quot; &lt;&lt; alpha&lt;&lt; &quot;\n Der Winkel Beta = &quot; &lt;&lt; beta &lt;&lt; endl;  
          }

    if ('b' &amp;&amp; 'c') {
            cout &lt;&lt; &quot;Bitte zuerst den Wert fuer b und dann fuer c eingeben&quot; &lt;&lt; endl;}

    system (&quot;Pause&quot;);
    return 0;
}
</code></pre>
<p>Hoffe ihr könnt mir da weiterhelfen... <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>Edit Jester: Code-Tags eingefügt.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/337811/neuer-fehler-rechtwinkelige-dreiecke-anfänger-fehler</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 15:25:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/337811.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 30 Apr 2016 15:09:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 16:43:13 GMT]]></title><description><![CDATA[<p>Hallo, ich schreibe gerade ein kleines Programm (eher zum üben), wie auch immer, ich möchte, dass man am Anfang eingeben soll welche beiden Variablen man hat (z.b. Seite a und b) und dann die jeweilige if Funktion ausführen sollum den rest zu berechnen. Egal was ich eingebe, er geht immer gleich in die erste if Funktion hinein:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;cmath&gt;

using namespace std;

int main () {

    float a, b, c, h, alpha, beta, A, U, R;
    const float pi = 3.14159265359;
    char e='e',z='z';
    cin &gt;&gt; e &gt;&gt; z;

    if ('a' &amp;&amp; 'b') {
       cout &lt;&lt; &quot;bitte zuerst den Wert fuer a, dann den Wert fuer b eingeben \n&quot;;
          cin &gt;&gt; a &gt;&gt; b;
          c = sqrt (a*a+b*b);
          A = a*b/2;
          h = 2*A/c;
          U = a+b+c;
          R = c/2;
          alpha = (asin (a/c))*(360/(2*pi));
          beta = 90 - alpha;

          cout &lt;&lt; &quot;\n gegebene Werte: a= &quot; &lt;&lt; a &lt;&lt; &quot; ,b= &quot; &lt;&lt; b &lt;&lt; endl &lt;&lt; &quot;\n Die Seite c= &quot; &lt;&lt; c &lt;&lt; &quot;\n Die Hoehe= &quot; &lt;&lt; h &lt;&lt; &quot;\n Der Flaechninhalt= &quot;&lt;&lt; A &lt;&lt; &quot;\n Der Umfang = &quot; &lt;&lt; U &lt;&lt;
          &quot;\n Der Umkreisradius= &quot; &lt;&lt; R&lt;&lt; &quot;\n Der Winkel Alpha= &quot; &lt;&lt; alpha&lt;&lt; &quot;\n Der Winkel Beta = &quot; &lt;&lt; beta &lt;&lt; endl;  
          }

    if ('b' &amp;&amp; 'c') {
            cout &lt;&lt; &quot;Bitte zuerst den Wert fuer b und dann fuer c eingeben&quot; &lt;&lt; endl;}

    system (&quot;Pause&quot;);
    return 0;
}
</code></pre>
<p>Hoffe ihr könnt mir da weiterhelfen... <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>Edit Jester: Code-Tags eingefügt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494609</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494609</guid><dc:creator><![CDATA[stehlo]]></dc:creator><pubDate>Wed, 04 May 2016 16:43:13 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Sat, 30 Apr 2016 15:47:28 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/u1581" rel="nofollow">Jester</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/f43" rel="nofollow">Mathematik und Physik</a> in das Forum <a href="http://www.c-plusplus.net/forum/f15" rel="nofollow">C++ (alle ISO-Standards)</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/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/2494613</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494613</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 30 Apr 2016 15:47:28 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Sat, 30 Apr 2016 16:22:50 GMT]]></title><description><![CDATA[<p>Wenn Du den Benutzer in <code>e</code> und <code>z</code> etwas eingeben lässt, dann solltest Du auch <code>e</code> und/oder <code>z</code> in den <code>if</code> -Bedingungen mit irgendwas vergleichen.</p>
<p>Im Moment prüfst Du dort <code>'a' &amp;&amp; 'b'</code> , was wegen</p>
<p><code>'a'</code> ist ungleich <code>0</code> , ist <code>true</code><br />
<code>'b'</code> ist ungleich <code>0</code> , ist <code>true</code><br />
<code>true &amp;&amp; true</code> ist <code>true</code></p>
<p>immer <code>true</code> , also Wahr ist.</p>
<p>btw: warum initialisierst Du <code>e</code> mit <code>'e'</code> und <code>z</code> mit <code>'z'</code> ? Hat das irgendeinen tieferen Sinn?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494614</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494614</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Sat, 30 Apr 2016 16:22:50 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Sat, 30 Apr 2016 20:27:37 GMT]]></title><description><![CDATA[<p>Einen tiefen Sinn hat das mit e und z nicht, ich kann aber die Chars nicht nur so integrieren.<br />
Wie kann ich das mit den true &amp;&amp; true ändern, sodass es unterschieden wird und das ganze funktioniert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494626</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494626</guid><dc:creator><![CDATA[stehlo]]></dc:creator><pubDate>Sat, 30 Apr 2016 20:27:37 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Sun, 01 May 2016 06:46:42 GMT]]></title><description><![CDATA[<p>Indem du den <strong>Inhalt</strong> der Variablen mit dem gewünschten Wert vergleichst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494645</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494645</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Sun, 01 May 2016 06:46:42 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Sun, 01 May 2016 10:55:22 GMT]]></title><description><![CDATA[<p>Danke, aber ich bin echt noch ein Anfänger auf diesem Gebiet, wie kann ich das machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494652</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494652</guid><dc:creator><![CDATA[stehlo]]></dc:creator><pubDate>Sun, 01 May 2016 10:55:22 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Sun, 01 May 2016 11:47:05 GMT]]></title><description><![CDATA[<p>Hast du denn kein Buch, nach dem du lernst? Stichwort: Vergleichsoperatoren, s. z.B. <a href="http://www.online-tutorials.net/c-c++-c/c++-tutorial-teil-1/tutorials-t-1-58.html#kontrollstrukturen" rel="nofollow">Kontrollstrukturen: if/else</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494654</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494654</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Sun, 01 May 2016 11:47:05 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Sun, 01 May 2016 15:10:40 GMT]]></title><description><![CDATA[<p>stehlo schrieb:</p>
<blockquote>
<p>Danke, aber ich bin echt noch ein Anfänger auf diesem Gebiet, wie kann ich das machen?</p>
</blockquote>
<p>if(e=='a')<br />
{<br />
...<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494660</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494660</guid><dc:creator><![CDATA[hgfhgfhf]]></dc:creator><pubDate>Sun, 01 May 2016 15:10:40 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Sun, 01 May 2016 17:17:30 GMT]]></title><description><![CDATA[<p>Hat funktioniert, vielen Dank ihr seid super</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494665</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494665</guid><dc:creator><![CDATA[stehlo]]></dc:creator><pubDate>Sun, 01 May 2016 17:17:30 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 17:33:43 GMT]]></title><description><![CDATA[<p>Hallo nochmal, ich melde mich mit einem neuem Problem zurück:<br />
und zwar habe ich jetzt einiges geändert, und hinzugefüügt, ich stehe jetzt abr vor einem neuen Problem, und zwar wenn ich das so habe (s. unten) dann nimmt er zwar jeweils wenn ich a,b und b,c eingebe, aber er nimmt es nicht, wenn ich a,c eingebe.<br />
Hoffe es kann mir wieder jmd. helfen</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;cmath&gt;

using namespace std;

int main () {

    float a, b, c, h, alpha, beta, A, U, R;
    const float pi = 3.14159265359;
    string e,z;
    cin &gt;&gt; e &gt;&gt; z;

    if (e==&quot;a&quot; &amp;&amp; z==&quot;b&quot;) {
          cout &lt;&lt; &quot;bitte zuerst den Wert fuer a, dann den Wert fuer b eingeben \n&quot;;
          cin &gt;&gt; a &gt;&gt; b;
          c = sqrt (a*a+b*b);
          A = a*b/2;
          h = 2*A/c;
          U = a+b+c;
          R = c/2;
          alpha = (asin (a/c))*(360/(2*pi));
          beta = 90 - alpha;
          cout &lt;&lt; &quot;\n gegebene Werte: a= &quot; &lt;&lt; a &lt;&lt; &quot; ,b= &quot; &lt;&lt; b &lt;&lt; endl &lt;&lt; &quot;\n Die Seite c= &quot; &lt;&lt; c &lt;&lt; &quot;\n Die Hoehe= &quot; &lt;&lt; h &lt;&lt; &quot;\n Der Flaechninhalt= &quot;&lt;&lt; A &lt;&lt; &quot;\n Der Umfang = &quot; &lt;&lt; U &lt;&lt;
          &quot;\n Der Umkreisradius= &quot; &lt;&lt; R&lt;&lt; &quot;\n Der Winkel Alpha= &quot; &lt;&lt; alpha&lt;&lt; &quot;\n Der Winkel Beta = &quot; &lt;&lt; beta &lt;&lt; endl;  
          }

    if (e==&quot;b&quot; &amp;&amp; z==&quot;c&quot;) {
          cout &lt;&lt; &quot;Bitte zuerst den Wert fuer b und dann fuer c eingeben&quot; &lt;&lt; endl;
          cin &gt;&gt; b &gt;&gt; c;
          a = sqrt (c*c-b*b);
          A = a*b/2;
          h = 2*A/c;
          U = a+b+c;
          R = c/2;
          alpha = (asin (a/c))*(360/(2*pi));
          beta = 90 - alpha;
          cout &lt;&lt; &quot;\n gegebene Werte: b= &quot; &lt;&lt; b &lt;&lt; &quot; ,c= &quot; &lt;&lt; c &lt;&lt; endl &lt;&lt; &quot;\n Die Seite a= &quot; &lt;&lt; a &lt;&lt; &quot;\n Die Hoehe= &quot; &lt;&lt; h &lt;&lt; &quot;\n Der Flaechninhalt= &quot;&lt;&lt; A &lt;&lt; &quot;\n Der Umfang = &quot; &lt;&lt; U &lt;&lt;
          &quot;\n Der Umkreisradius= &quot; &lt;&lt; R&lt;&lt; &quot;\n Der Winkel Alpha= &quot; &lt;&lt; alpha&lt;&lt; &quot;\n Der Winkel Beta = &quot; &lt;&lt; beta &lt;&lt; endl;}

   if (e==&quot;a&quot; &amp;&amp; z==&quot;c&quot;) {
          cout &lt;&lt; &quot;Bitte zuerst den Wert fuer a und dann fuer c eingeben&quot; &lt;&lt; endl;
          cin &gt;&gt; a &gt;&gt; c;
          a = sqrt (c*c-a*a);
          A = a*b/2;
          h = 2*A/c;
          U = a+b+c;
          R = c/2;
          alpha = (asin (a/c))*(360/(2*pi));
          beta = 90 - alpha;
          cout &lt;&lt; &quot;\n gegebene Werte: a= &quot; &lt;&lt; a &lt;&lt; &quot; ,c= &quot; &lt;&lt; c &lt;&lt; endl &lt;&lt; &quot;\n Die Seite b= &quot; &lt;&lt; b &lt;&lt; &quot;\n Die Hoehe= &quot; &lt;&lt; h &lt;&lt; &quot;\n Der Flaechninhalt= &quot;&lt;&lt; A &lt;&lt; &quot;\n Der Umfang = &quot; &lt;&lt; U &lt;&lt;
          &quot;\n Der Umkreisradius= &quot; &lt;&lt; R&lt;&lt; &quot;\n Der Winkel Alpha= &quot; &lt;&lt; alpha&lt;&lt; &quot;\n Der Winkel Beta = &quot; &lt;&lt; beta &lt;&lt; endl;}    

    system (&quot;Pause&quot;);
    return 0;
}
</code></pre>
<p>bei letzten if befehl geht irgendetwas nicht</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494914</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494914</guid><dc:creator><![CDATA[stehlo]]></dc:creator><pubDate>Wed, 04 May 2016 17:33:43 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 17:26:21 GMT]]></title><description><![CDATA[<p><a href="https://www.c-plusplus.net/forum/p2454960#2454960">Wie man seinen Beitrag lesbar formatiert</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494918</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494918</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 04 May 2016 17:26:21 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 17:57:40 GMT]]></title><description><![CDATA[<p>Also bei mir geht das (für &quot;compiliert, wenn ich system auskommentiere&quot; und &quot;läuft durch, gibt aber nicht unbedingt das richtige aus&quot;):</p>
<p>`</p>
<p>~/test % ./cpp</p>
<p>a c</p>
<p>Bitte zuerst den Wert fuer a und dann fuer c eingeben</p>
<p>5 7</p>
<p>gegebene Werte: a= 4.89898 ,c= 7</p>
<p>Die Seite b= 8.82691e-39</p>
<p>Die Hoehe= 6.17755e-39</p>
<p>Der Flaechninhalt= 2.16214e-38</p>
<p>Der Umfang = 11.899</p>
<p>Der Umkreisradius= 3.5</p>
<p>Der Winkel Alpha= 44.4153</p>
<p>Der Winkel Beta = 45.5847</p>
<p>`</p>
<p>Man sieht schon, ich habe 5 für a eingegeben und das Programm behauptet, ich hätte 4.89 eingegeben...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494919</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494919</guid><dc:creator><![CDATA[wob]]></dc:creator><pubDate>Wed, 04 May 2016 17:57:40 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 18:03:39 GMT]]></title><description><![CDATA[<p>Hast recht, wenn man irgendwelche Buchstaben eingibt (z.B. k und L) und anschließend werte eingibt spuckt er immer deine Werte aus.</p>
<p>weiß jemand woran das liegen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494920</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494920</guid><dc:creator><![CDATA[stehlo]]></dc:creator><pubDate>Wed, 04 May 2016 18:03:39 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 18:04:37 GMT]]></title><description><![CDATA[<p>Mein Lieblingsfehler: vergessen zu kompilieren. Hast du kompiliert?</p>
<p>Oder hast du ggf was anderes als &quot;a c&quot; (oder a(Enter) c(Enter)) eingegeben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494923</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494923</guid><dc:creator><![CDATA[wob]]></dc:creator><pubDate>Wed, 04 May 2016 18:04:37 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 18:06:58 GMT]]></title><description><![CDATA[<p>Wenn man k l eingibt, erfolgt überhaupt keine Ausgabe. Verstehe nicht, warum du da etwas ausgegeben bekommen solltest.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494926</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494926</guid><dc:creator><![CDATA[wob]]></dc:creator><pubDate>Wed, 04 May 2016 18:06:58 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 18:08:03 GMT]]></title><description><![CDATA[<p>Ja kompiliert habe ich und ich gebe auch immer a (enter), c(enter) ein, aber so ist das auch programmiert. Was ich nicht verstehe ist , dass er immer die Werte ausgibt, auch wenn man Buchstaben eingibt, die garnicht im Programmcode vorkommen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494928</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494928</guid><dc:creator><![CDATA[stehlo]]></dc:creator><pubDate>Wed, 04 May 2016 18:08:03 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 18:10:16 GMT]]></title><description><![CDATA[<p>Ja er gibt da noch nichts aus, erst wenn du danach noch einen Wert für die beiden eingibst wirft er sinnlose Zahlen heraus.?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494931</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494931</guid><dc:creator><![CDATA[stehlo]]></dc:creator><pubDate>Wed, 04 May 2016 18:10:16 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 18:15:32 GMT]]></title><description><![CDATA[<p>Nein, das Programm beendet sich, wenn du &quot;falsche&quot; Buchstaben eingibst.</p>
<p>Hier:<br />
`</p>
<p>~/test % ./cpp</p>
<p>k l</p>
<p>~/test %</p>
<p>`</p>
<p>Wie zu erwarten. Nix da.</p>
<p>Du benutzt wohl ein anderes Programm bei dir als das, was du hier gepostet hast.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494932</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494932</guid><dc:creator><![CDATA[wob]]></dc:creator><pubDate>Wed, 04 May 2016 18:15:32 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 18:33:46 GMT]]></title><description><![CDATA[<p>es sollte das selbe Programm sein:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;cmath&gt;

using namespace std;

int main () {

    float a, b, c, h, alpha, beta, A, U, R;
    const float pi = 3.14159265359;
    string e,z;
    cin &gt;&gt; e &gt;&gt; z;

    if (e==&quot;a&quot; &amp;&amp; z==&quot;b&quot;) {
          cout &lt;&lt; &quot;bitte zuerst den Wert fuer a, dann den Wert fuer b eingeben \n&quot;;
          cin &gt;&gt; a &gt;&gt; b;
          c = sqrt (a*a+b*b);
          A = a*b/2;
          h = 2*A/c;
          U = a+b+c;
          R = c/2;
          alpha = (asin (a/c))*(360/(2*pi));
          beta = 90 - alpha;
          cout &lt;&lt; &quot;\n gegebene Werte: a= &quot; &lt;&lt; a &lt;&lt; &quot; ,b= &quot; &lt;&lt; b &lt;&lt; endl &lt;&lt; &quot;\n Die Seite c= &quot; &lt;&lt; c &lt;&lt; &quot;\n Die Hoehe= &quot; &lt;&lt; h &lt;&lt; &quot;\n Der Flaechninhalt= &quot;&lt;&lt; A &lt;&lt; &quot;\n Der Umfang = &quot; &lt;&lt; U &lt;&lt;
          &quot;\n Der Umkreisradius= &quot; &lt;&lt; R&lt;&lt; &quot;\n Der Winkel Alpha= &quot; &lt;&lt; alpha&lt;&lt; &quot;\n Der Winkel Beta = &quot; &lt;&lt; beta &lt;&lt; endl;  
          }

    if (e==&quot;b&quot; &amp;&amp; z==&quot;c&quot;) {
          cout &lt;&lt; &quot;Bitte zuerst den Wert fuer b und dann fuer c eingeben&quot; &lt;&lt; endl;
          cin &gt;&gt; b &gt;&gt; c;
          a = sqrt (c*c-b*b);
          A = a*b/2;
          h = 2*A/c;
          U = a+b+c;
          R = c/2;
          alpha = (asin (a/c))*(360/(2*pi));
          beta = 90 - alpha;
          cout &lt;&lt; &quot;\n gegebene Werte: b= &quot; &lt;&lt; b &lt;&lt; &quot; ,c= &quot; &lt;&lt; c &lt;&lt; endl &lt;&lt; &quot;\n Die Seite a= &quot; &lt;&lt; a &lt;&lt; &quot;\n Die Hoehe= &quot; &lt;&lt; h &lt;&lt; &quot;\n Der Flaechninhalt= &quot;&lt;&lt; A &lt;&lt; &quot;\n Der Umfang = &quot; &lt;&lt; U &lt;&lt;
          &quot;\n Der Umkreisradius= &quot; &lt;&lt; R&lt;&lt; &quot;\n Der Winkel Alpha= &quot; &lt;&lt; alpha&lt;&lt; &quot;\n Der Winkel Beta = &quot; &lt;&lt; beta &lt;&lt; endl;}

   if (e==&quot;a&quot; &amp;&amp; z==&quot;c&quot;) {
          cout &lt;&lt; &quot;Bitte zuerst den Wert fuer a und dann fuer c eingeben&quot; &lt;&lt; endl;
          cin &gt;&gt; a &gt;&gt; c;
          a = sqrt (c*c-a*a);
          A = a*b/2;
          h = 2*A/c;
          U = a+b+c;
          R = c/2;
          alpha = (asin (a/c))*(360/(2*pi));
          beta = 90 - alpha;
          cout &lt;&lt; &quot;\n gegebene Werte: a= &quot; &lt;&lt; a &lt;&lt; &quot; ,c= &quot; &lt;&lt; c &lt;&lt; endl &lt;&lt; &quot;\n Die Seite b= &quot; &lt;&lt; b &lt;&lt; &quot;\n Die Hoehe= &quot; &lt;&lt; h &lt;&lt; &quot;\n Der Flaechninhalt= &quot;&lt;&lt; A &lt;&lt; &quot;\n Der Umfang = &quot; &lt;&lt; U &lt;&lt;
          &quot;\n Der Umkreisradius= &quot; &lt;&lt; R&lt;&lt; &quot;\n Der Winkel Alpha= &quot; &lt;&lt; alpha&lt;&lt; &quot;\n Der Winkel Beta = &quot; &lt;&lt; beta &lt;&lt; endl;}    

    system (&quot;Pause&quot;);
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2494936</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494936</guid><dc:creator><![CDATA[stehlo]]></dc:creator><pubDate>Wed, 04 May 2016 18:33:46 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 18:53:01 GMT]]></title><description><![CDATA[<p>Letzte Chance: kompilierst du auch die richtige Datei?</p>
<p>Bau doch ganz oben mal ein:</p>
<pre><code>cout &lt;&lt; &quot;Bitte die Seiten des Dreiecks eingeben (z.B. 'a c'): &quot;;
</code></pre>
<p>und stelle sicher, dass diese Ausgabe auch erscheint.</p>
<p>Ansonsten gibt es nur noch die Möglichkeit, dass du ein Programm namens &quot;Pause&quot; hast, das nicht tut, was du denkst (ich habe hier kein &quot;Pause&quot; und habe die Zeile daher auskommentiert, ansonsten aber nichts geändert und kann deine Aussagen nicht nachvollziehen).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494941</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494941</guid><dc:creator><![CDATA[wob]]></dc:creator><pubDate>Wed, 04 May 2016 18:53:01 GMT</pubDate></item><item><title><![CDATA[Reply to Neuer Fehler: rechtwinkelige Dreiecke, Anfänger fehler on Wed, 04 May 2016 22:12:49 GMT]]></title><description><![CDATA[<p>Danke, dass du dir so viel Zeit genommen hast.<br />
Anscheinend hat er<br />
1. eine Datei überchrieben aber falsch kopiliert, der Tipp mit den cout war toll, 2. hat ich ihm eine falsche formel gegeben,</p>
<p>funktioniert jetzt grundsätzlich</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2494966</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2494966</guid><dc:creator><![CDATA[stehlo]]></dc:creator><pubDate>Wed, 04 May 2016 22:12:49 GMT</pubDate></item></channel></rss>