<?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[Quadratische Gleichungen]]></title><description><![CDATA[<p>Hey ich habe vor kurzem mit c++ Angefangen. Da mir langweilig ist, habe ich ein Programm geschrieben, das eine quadratische Gleichung löst.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;math.h&gt;
using namespace std;

float a,b,c,d,x1,x2 ;    

int main()
   {
   a = 8 ;
   b = 16 ;
   c = 64 ;

   d = sqrt( b*b - 4*a*c ) ;

   x1 = ( -b + d )/(2*a) ;
   x2 = ( -b - d )/(2*a) ;
   cout &lt;&lt; &quot;1.Loesung &quot; &lt;&lt; x1 &lt;&lt; endl;
   cout &lt;&lt; &quot;2.Loesung &quot; &lt;&lt; x2 &lt;&lt; endl;
   }
</code></pre>
<p>Wie kann ich nun mit einer Schleife heruasfinden, ob das Ergebniss sureal wird oder nicht ? Denn momentan gibt mir Visual c++ -1.#IND als ergebniss aus.(Ist auch logisch bei den Werten^^). Jedoch möchte ich, dass eine sourealle Zahl -in diesem Fall- so geschrieben wird:<br />
-1 - 2,6457513110645907·i<br />
-1 + 2,6457513110645907·î</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/282830/quadratische-gleichungen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 01:38:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/282830.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 27 Feb 2011 16:44:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Quadratische Gleichungen on Sun, 27 Feb 2011 16:44:14 GMT]]></title><description><![CDATA[<p>Hey ich habe vor kurzem mit c++ Angefangen. Da mir langweilig ist, habe ich ein Programm geschrieben, das eine quadratische Gleichung löst.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;math.h&gt;
using namespace std;

float a,b,c,d,x1,x2 ;    

int main()
   {
   a = 8 ;
   b = 16 ;
   c = 64 ;

   d = sqrt( b*b - 4*a*c ) ;

   x1 = ( -b + d )/(2*a) ;
   x2 = ( -b - d )/(2*a) ;
   cout &lt;&lt; &quot;1.Loesung &quot; &lt;&lt; x1 &lt;&lt; endl;
   cout &lt;&lt; &quot;2.Loesung &quot; &lt;&lt; x2 &lt;&lt; endl;
   }
</code></pre>
<p>Wie kann ich nun mit einer Schleife heruasfinden, ob das Ergebniss sureal wird oder nicht ? Denn momentan gibt mir Visual c++ -1.#IND als ergebniss aus.(Ist auch logisch bei den Werten^^). Jedoch möchte ich, dass eine sourealle Zahl -in diesem Fall- so geschrieben wird:<br />
-1 - 2,6457513110645907·i<br />
-1 + 2,6457513110645907·î</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2027307</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2027307</guid><dc:creator><![CDATA[manta656]]></dc:creator><pubDate>Sun, 27 Feb 2011 16:44:14 GMT</pubDate></item><item><title><![CDATA[Reply to Quadratische Gleichungen on Sun, 27 Feb 2011 16:49:50 GMT]]></title><description><![CDATA[<p>Indem du bestimmst, ob die Diskriminante negativ ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2027309</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2027309</guid><dc:creator><![CDATA[314159265358979]]></dc:creator><pubDate>Sun, 27 Feb 2011 16:49:50 GMT</pubDate></item><item><title><![CDATA[Reply to Quadratische Gleichungen on Sun, 27 Feb 2011 18:17:27 GMT]]></title><description><![CDATA[<p>Überprüfe, ob beim &quot;wurzeln&quot; was negatives in der Klammer steht, und mach es positiv (z.b mit fabs() aus cmath) und setzte eine Variable vom Typ bool.<br />
Berechne alles wie sonst auch, aber am Schluss gibst du dann entsprechend anders aus, wenn die bool Variable == true ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2027310</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2027310</guid><dc:creator><![CDATA[MGOS]]></dc:creator><pubDate>Sun, 27 Feb 2011 18:17:27 GMT</pubDate></item><item><title><![CDATA[Reply to Quadratische Gleichungen on Sun, 27 Feb 2011 18:12:15 GMT]]></title><description><![CDATA[<p>was zum teufel ist ne surreale zahl?<br />
(ok habs gegoogelt)<br />
und wieso weiss jeder ausser mir was das ist?</p>
<p>meinst du nicht komplexe zahlen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2027353</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2027353</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Sun, 27 Feb 2011 18:12:15 GMT</pubDate></item><item><title><![CDATA[Reply to Quadratische Gleichungen on Sun, 27 Feb 2011 18:34:20 GMT]]></title><description><![CDATA[<p>C++ unterstützt auch komplexe Zahlen: <a href="http://www.cplusplus.com/reference/std/complex/" rel="nofollow">http://www.cplusplus.com/reference/std/complex/</a></p>
<p>Um herauszufinden, ob die Zahl komplex ist, einfach prüfen ob imag 0 ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2027367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2027367</guid><dc:creator><![CDATA[Eisflamme]]></dc:creator><pubDate>Sun, 27 Feb 2011 18:34:20 GMT</pubDate></item></channel></rss>