<?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[berechnung von zahlen]]></title><description><![CDATA[<p>Habe folgendes Problem. Möchte etwas berechnen, doch es kommt immer null heraus. Warum? Wie kann ich das anders machen</p>
<p>a-h sind immer ganze Zahlen</p>
<pre><code>unsigned int a  = 0;
unsigned int b  = 0;
unsigned int c  = 0;
unsigned int d  = 0;
unsigned int e  = 0;
unsigned int f  = 0;
unsigned int g  = 0;
unsigned int h  = 0;

unsigned int Ra = 0;
unsigned int Rb = 0;
unsigned int Rc = 0;
unsigned int Rd = 0;

float W1=0;

a  = Edit1-&gt;Text.ToInt();
b  = Edit2-&gt;Text.ToInt();
c  = Edit3-&gt;Text.ToInt();
d  = Edit4-&gt;Text.ToInt();
e  = Edit5-&gt;Text.ToInt();
f  = Edit6-&gt;Text.ToInt();
g  = Edit7-&gt;Text.ToInt();
h  = Edit8-&gt;Text.ToInt();

Ra = a+b+c+d;
Rb = e+f+g+h;

W1 = 1/((1/Ra)+(1/Rb));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/140655/berechnung-von-zahlen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 03 Aug 2026 16:18:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/140655.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Mar 2006 12:49:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to berechnung von zahlen on Thu, 16 Mar 2006 12:49:48 GMT]]></title><description><![CDATA[<p>Habe folgendes Problem. Möchte etwas berechnen, doch es kommt immer null heraus. Warum? Wie kann ich das anders machen</p>
<p>a-h sind immer ganze Zahlen</p>
<pre><code>unsigned int a  = 0;
unsigned int b  = 0;
unsigned int c  = 0;
unsigned int d  = 0;
unsigned int e  = 0;
unsigned int f  = 0;
unsigned int g  = 0;
unsigned int h  = 0;

unsigned int Ra = 0;
unsigned int Rb = 0;
unsigned int Rc = 0;
unsigned int Rd = 0;

float W1=0;

a  = Edit1-&gt;Text.ToInt();
b  = Edit2-&gt;Text.ToInt();
c  = Edit3-&gt;Text.ToInt();
d  = Edit4-&gt;Text.ToInt();
e  = Edit5-&gt;Text.ToInt();
f  = Edit6-&gt;Text.ToInt();
g  = Edit7-&gt;Text.ToInt();
h  = Edit8-&gt;Text.ToInt();

Ra = a+b+c+d;
Rb = e+f+g+h;

W1 = 1/((1/Ra)+(1/Rb));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1017483</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1017483</guid><dc:creator><![CDATA[tom883]]></dc:creator><pubDate>Thu, 16 Mar 2006 12:49:48 GMT</pubDate></item><item><title><![CDATA[Reply to berechnung von zahlen on Thu, 16 Mar 2006 12:52:05 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Integer haben keine Nachkommastellen, also wird aus 1/int entweder 1,0 oder -1.</p>
<p>du must in float erstmal konvertieren</p>
<pre><code class="language-cpp">W1 = 1.0/((1.0/float(Ra))+(1.0/float(Rb)));
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1017486</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1017486</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 16 Mar 2006 12:52:05 GMT</pubDate></item><item><title><![CDATA[Reply to berechnung von zahlen on Thu, 16 Mar 2006 12:53:23 GMT]]></title><description><![CDATA[<p>Schon mal debuggt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1017490</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1017490</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Thu, 16 Mar 2006 12:53:23 GMT</pubDate></item><item><title><![CDATA[Reply to berechnung von zahlen on Thu, 16 Mar 2006 12:55:00 GMT]]></title><description><![CDATA[<p>Das float ist hier aber unnötig.</p>
<pre><code class="language-cpp">W1 = 1.0/((1.0/Ra)+(1.0/Rb));
</code></pre>
<p>Das sollte reichen. Wobei hier ein Test auf Division durch 0 auch nicht schadet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1017491</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1017491</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 16 Mar 2006 12:55:00 GMT</pubDate></item><item><title><![CDATA[Reply to berechnung von zahlen on Thu, 16 Mar 2006 13:03:18 GMT]]></title><description><![CDATA[<p>Danke klappt jetzt. Das mit dem float wußte ich, habe es nur an eine falsche Stelle gesetzt und dann war es schon zu spät.</p>
<p>Danke nochmal für die schnelle Antwort.</p>
<p>W1 = 1.0/((1.0/float(Ra))+(1.0/float(Rb)));</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1017500</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1017500</guid><dc:creator><![CDATA[tom883]]></dc:creator><pubDate>Thu, 16 Mar 2006 13:03:18 GMT</pubDate></item></channel></rss>