<?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[Programm Berechnung quadratischer Funktionen benötige Hilfe]]></title><description><![CDATA[<p>Hallo !<br />
Kann mir wer sagen, warum dieses Programm nach Eingabe der Werte a,b,c abschaltet.<br />
Hab da sicher einen grundlegenden Fehler gemacht, aber ich komm nicht dahinter</p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;
#include &lt;math.h&gt;
#include &lt;conio.h&gt;

void main()
{
  clrscr();
  float a,b,c,x1,x2,p,q,p05,wurzel,xL;
  cout&lt;&lt;&quot;Programm zur Berechnung quadratischer Funktionen&quot;&lt;&lt;endl;
  cout&lt;&lt;&quot;Werte von a,b,c eingeben&quot;&lt;&lt;endl;
  cin &gt;&gt; a;
  cin &gt;&gt; b;
  cin &gt;&gt; c;
	q=c/a;
	p=b/a;
	p05=p/(-2);
	wurzel= sqrt (((p*p)/4)-q);
	x1= p05+wurzel;
	x2= p05-wurzel;

	if (a!=0)
	cout &lt;&lt;&quot;X1=&quot;&lt;&lt;x1&lt;&lt;&quot;X2=&quot;&lt;&lt;x2&lt;&lt;endl;
		 if (a&gt;0)
		      cout &lt;&lt;&quot;Parable ist positiv.Max =&quot;&lt;&lt;p05&lt;&lt;endl;

		 else
		      cout &lt;&lt;&quot;Parable ist negativ.Min =&quot;&lt;&lt;p05&lt;&lt;endl;

	else (a==0)
	 cout &lt;&lt;&quot;Lineare Funktion. Nur eine L”sung&lt;&lt;(-c)/b&lt;&lt;endl;

}
</code></pre>
<p>gruß martin</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/213219/programm-berechnung-quadratischer-funktionen-benötige-hilfe</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 10:21:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/213219.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 May 2008 11:59:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 11:59:41 GMT]]></title><description><![CDATA[<p>Hallo !<br />
Kann mir wer sagen, warum dieses Programm nach Eingabe der Werte a,b,c abschaltet.<br />
Hab da sicher einen grundlegenden Fehler gemacht, aber ich komm nicht dahinter</p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;
#include &lt;math.h&gt;
#include &lt;conio.h&gt;

void main()
{
  clrscr();
  float a,b,c,x1,x2,p,q,p05,wurzel,xL;
  cout&lt;&lt;&quot;Programm zur Berechnung quadratischer Funktionen&quot;&lt;&lt;endl;
  cout&lt;&lt;&quot;Werte von a,b,c eingeben&quot;&lt;&lt;endl;
  cin &gt;&gt; a;
  cin &gt;&gt; b;
  cin &gt;&gt; c;
	q=c/a;
	p=b/a;
	p05=p/(-2);
	wurzel= sqrt (((p*p)/4)-q);
	x1= p05+wurzel;
	x2= p05-wurzel;

	if (a!=0)
	cout &lt;&lt;&quot;X1=&quot;&lt;&lt;x1&lt;&lt;&quot;X2=&quot;&lt;&lt;x2&lt;&lt;endl;
		 if (a&gt;0)
		      cout &lt;&lt;&quot;Parable ist positiv.Max =&quot;&lt;&lt;p05&lt;&lt;endl;

		 else
		      cout &lt;&lt;&quot;Parable ist negativ.Min =&quot;&lt;&lt;p05&lt;&lt;endl;

	else (a==0)
	 cout &lt;&lt;&quot;Lineare Funktion. Nur eine L”sung&lt;&lt;(-c)/b&lt;&lt;endl;

}
</code></pre>
<p>gruß martin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1509584</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1509584</guid><dc:creator><![CDATA[martin999]]></dc:creator><pubDate>Thu, 15 May 2008 11:59:41 GMT</pubDate></item><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 12:03:49 GMT]]></title><description><![CDATA[<p>Nur kurz zu Erklärung</p>
<p>Ich soll eine quadratische Funktion mit der -p/2 +- &quot;wurzel&quot; p*p/4 -q lösen.<br />
Oder angeben, dass es eine lineare Funktion ist wenn a = 0 ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1509589</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1509589</guid><dc:creator><![CDATA[martin999]]></dc:creator><pubDate>Thu, 15 May 2008 12:03:49 GMT</pubDate></item><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 12:25:34 GMT]]></title><description><![CDATA[<p>Siehe dazu hier:<br />
<a href="http://c-plusplus.net/forum/viewtopic-var-t-is-111042.html" rel="nofollow">http://c-plusplus.net/forum/viewtopic-var-t-is-111042.html</a></p>
<p>Davon abgesehen dürfte das erst gar nicht kompilieren.</p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;  //das heisst schon seit gut zehn Jahren iostream
#include &lt;math.h&gt;      //ebenfalls veraltet
#include &lt;conio.h&gt;

void main()  //das lautete aber schon immer int main()
{
  clrscr();
  float a,b,c,x1,x2,p,q,p05,wurzel,xL; //xL verwendest du später nicht
  cout&lt;&lt;&quot;Programm zur Berechnung quadratischer Funktionen&quot;&lt;&lt;endl;
  cout&lt;&lt;&quot;Werte von a,b,c eingeben&quot;&lt;&lt;endl;
  cin &gt;&gt; a;
  cin &gt;&gt; b;
  cin &gt;&gt; c;
	q=c/a; //was ist, wenn für a 0 eingeben wurde?
	p=b/a; //s.o.
	p05=p/(-2);
	wurzel= sqrt (((p*p)/4)-q); //wenn die Gleichung keine Lösung hat, hast du hier ein Problem
	x1= p05+wurzel;
	x2= p05-wurzel;

	if (a!=0) //hier fehlen die geschweiften Klammern
	cout &lt;&lt;&quot;X1=&quot;&lt;&lt;x1&lt;&lt;&quot;X2=&quot;&lt;&lt;x2&lt;&lt;endl; //Leerzeichen
		 if (a&gt;0)
		      cout &lt;&lt;&quot;Parable ist positiv.Max =&quot;&lt;&lt;p05&lt;&lt;endl; //von positiven Parabeln hab ich noch nicht gehört...
                                                             //aber nach oben geöffnete Parabeln haben eine Minimalstelle, keine Maximalstelle

		 else
		      cout &lt;&lt;&quot;Parable ist negativ.Min =&quot;&lt;&lt;p05&lt;&lt;endl; //hier auch

	else (a==0) //muss einfach nur else heißen
	 cout &lt;&lt;&quot;Lineare Funktion. Nur eine L”sung&lt;&lt;(-c)/b&lt;&lt;endl; //da fehlt das abschließende Anführungszeichen

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1509630</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1509630</guid><dc:creator><![CDATA[Nanyuki]]></dc:creator><pubDate>Thu, 15 May 2008 12:25:34 GMT</pubDate></item><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 13:07:28 GMT]]></title><description><![CDATA[<p>Danke</p>
<p>Das mit void und iostream.h geht bei mir nur so<br />
Jetzt gibt er mir zwar keinen Fehler mehr an, es ist aber immer noch so,dass nach der Eingabe von a,b,c schluss ist<br />
kann es mir nicht ganz erklären</p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;
#include &lt;math.h&gt;
#include &lt;conio.h&gt;

void main()
{
  clrscr();
  float a,b,c,x1,x2,p,q,p05,wurzel;
  cout&lt;&lt;&quot;Programm zur Berechnung quadratischer Funktionen&quot;&lt;&lt;endl;
  cout&lt;&lt;&quot;Werte von a,b,c eingeben&quot;&lt;&lt;endl;
  cin &gt;&gt; a;
  cin &gt;&gt; b;
  cin &gt;&gt; c;

	if (a!=0)
	{
		q=c/a;
		p=b/a;
		p05= p/(-2);
		wurzel = sqrt (((p*p)/4)-q);
  		x1= p05+wurzel;
		x2= p05-wurzel;
		cout &lt;&lt;&quot;X1=&quot;&lt;&lt; x1 &lt;&lt;&quot;X2=&quot;&lt;&lt; x2 &lt;&lt;endl;
	}
		 if (a&gt;0) {
		      cout &lt;&lt;&quot; Maximalstelle =&quot;&lt;&lt; p05 &lt;&lt;endl;
                 }
		 if (a&lt;=0) {
		      cout &lt;&lt;&quot; Minimalstelle =&quot;&lt;&lt; p05 &lt;&lt;endl;

		 }

    else {
	 cout &lt;&lt;&quot;Lineare Funktion. Nur eine L”sung&quot;&lt;&lt; (-c)/b &lt;&lt;endl;
	 }

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1509711</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1509711</guid><dc:creator><![CDATA[Aho]]></dc:creator><pubDate>Thu, 15 May 2008 13:07:28 GMT</pubDate></item><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 13:37:43 GMT]]></title><description><![CDATA[<p>Deswegen solltest du dir ja den verlinkten Artikel ansehen.<br />
Wenn das Programm fertig ist, schließt sich das Konsolenfenster natürlich wieder, wenn du keine weiteren Maßnahmen ergreifst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1509747</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1509747</guid><dc:creator><![CDATA[Nanyuki]]></dc:creator><pubDate>Thu, 15 May 2008 13:37:43 GMT</pubDate></item><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 13:50:34 GMT]]></title><description><![CDATA[<p>Danke für den Link, aber das Problem liegt wo anders.<br />
Auch wenn ich noch eine Eingabeauforderung zb. &quot;cin &gt;&gt; aus;&quot; reintippe<br />
funktioniert es nicht</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1509767</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1509767</guid><dc:creator><![CDATA[Aho]]></dc:creator><pubDate>Thu, 15 May 2008 13:50:34 GMT</pubDate></item><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 14:07:43 GMT]]></title><description><![CDATA[<p>Hmja... wenn du Werte eingibst, die dazu führen, dass versucht wird, die Wurzel aus einer negativen Zahl zu ziehen, dann bricht das Programm sofort ab und gelangt damit auch nicht mehr zu deinem cin. Also würde ich da erst noch eine Überprüfung vornehmen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1509784</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1509784</guid><dc:creator><![CDATA[Nanyuki]]></dc:creator><pubDate>Thu, 15 May 2008 14:07:43 GMT</pubDate></item><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 17:30:16 GMT]]></title><description><![CDATA[<p>es gibt ne besser möglichkeit:</p>
<p>du lässt die 3 zahlen eingeben<br />
und lässt dir die determinante berechnen (die wurzel nur halt ohne wurzel)<br />
und wenn die kleiner 0 ist gibt es nur 2 komplexe lösungen<br />
wenns gleich 0 ist gibt es nur eine lösung ( -p/2 )<br />
und wenns grösser 0 ist gibt es 2 lösungen, genau die die du berechnen willst</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1509904</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1509904</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Thu, 15 May 2008 17:30:16 GMT</pubDate></item><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 17:53:59 GMT]]></title><description><![CDATA[<p>Skym0sh0 schrieb:</p>
<blockquote>
<p>und lässt dir die determinante berechnen (die wurzel nur halt ohne wurzel)</p>
</blockquote>
<p>Du meinst sicher die Diskriminante <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="😉"
    /> .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1509918</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1509918</guid><dc:creator><![CDATA[Walli]]></dc:creator><pubDate>Thu, 15 May 2008 17:53:59 GMT</pubDate></item><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 19:05:59 GMT]]></title><description><![CDATA[<p>ach is doch eh alles das gleiche xDDD</p>
<p>jo meinte ich</p>
<p>ich kürz das eh immer mit d ab, also is es auch peng <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=";D"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1509993</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1509993</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Thu, 15 May 2008 19:05:59 GMT</pubDate></item><item><title><![CDATA[Reply to Programm Berechnung quadratischer Funktionen benötige Hilfe on Thu, 15 May 2008 20:45:29 GMT]]></title><description><![CDATA[<p>jup das ist sicher besser<br />
danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1510085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1510085</guid><dc:creator><![CDATA[aho0]]></dc:creator><pubDate>Thu, 15 May 2008 20:45:29 GMT</pubDate></item></channel></rss>