<?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[Verknüpfung int und float]]></title><description><![CDATA[<p>int b;<br />
float a,c,xmin,xmax;</p>
<p>scanf(&quot;%f&quot;,&amp;xmax);<br />
scanf(&quot;%f&quot;,&amp;xmin);<br />
scanf(&quot;%f&quot;,&amp;x);</p>
<p>a=(xmax-xmin)/x;<br />
b=(int)a;<br />
c=a-b;</p>
<p>printf(&quot;%.2f&quot;,c);</p>
<p>kann mir jemand erklären wieso ich bei den werten xmin: 10 xmax:57.60 x: 3.40<br />
bei c= 1.00 rausbekomme ? ich hätte c= 0.00 erwartet</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/323956/verknüpfung-int-und-float</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 03:00:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/323956.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Feb 2014 14:37:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Verknüpfung int und float on Mon, 24 Feb 2014 14:37:53 GMT]]></title><description><![CDATA[<p>int b;<br />
float a,c,xmin,xmax;</p>
<p>scanf(&quot;%f&quot;,&amp;xmax);<br />
scanf(&quot;%f&quot;,&amp;xmin);<br />
scanf(&quot;%f&quot;,&amp;x);</p>
<p>a=(xmax-xmin)/x;<br />
b=(int)a;<br />
c=a-b;</p>
<p>printf(&quot;%.2f&quot;,c);</p>
<p>kann mir jemand erklären wieso ich bei den werten xmin: 10 xmax:57.60 x: 3.40<br />
bei c= 1.00 rausbekomme ? ich hätte c= 0.00 erwartet</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2384997</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2384997</guid><dc:creator><![CDATA[kscherz]]></dc:creator><pubDate>Mon, 24 Feb 2014 14:37:53 GMT</pubDate></item><item><title><![CDATA[Reply to Verknüpfung int und float on Mon, 24 Feb 2014 14:41:51 GMT]]></title><description><![CDATA[<p>kscherz schrieb:</p>
<blockquote>
<p>ich hätte c= 0.00 erwartet</p>
</blockquote>
<p>Warum?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2384998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2384998</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Mon, 24 Feb 2014 14:41:51 GMT</pubDate></item><item><title><![CDATA[Reply to Verknüpfung int und float on Mon, 24 Feb 2014 14:46:55 GMT]]></title><description><![CDATA[<p>na da c = 14.00-14 = 0.00</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385001</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385001</guid><dc:creator><![CDATA[kscherz]]></dc:creator><pubDate>Mon, 24 Feb 2014 14:46:55 GMT</pubDate></item><item><title><![CDATA[Reply to Verknüpfung int und float on Mon, 24 Feb 2014 14:49:24 GMT]]></title><description><![CDATA[<p>aso die variable x habe ich deklariert... habe ich jetzt nur im quelltext oben vergessen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385002</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385002</guid><dc:creator><![CDATA[kscherz]]></dc:creator><pubDate>Mon, 24 Feb 2014 14:49:24 GMT</pubDate></item><item><title><![CDATA[Reply to Verknüpfung int und float on Mon, 24 Feb 2014 14:51:20 GMT]]></title><description><![CDATA[<p>Guck mal, was b ist. Dann staune. Dann guck, was a <strong>genau</strong> ist. Dann denk nach, warum b das ist, was es ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385004</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385004</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 24 Feb 2014 14:51:20 GMT</pubDate></item><item><title><![CDATA[Reply to Verknüpfung int und float on Mon, 24 Feb 2014 14:52:17 GMT]]></title><description><![CDATA[<p>debugge doch mal. Vielleicht ist a nicht genau 14 sondern 13.99999999999999997.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2385005</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2385005</guid><dc:creator><![CDATA[daddy_felix]]></dc:creator><pubDate>Mon, 24 Feb 2014 14:52:17 GMT</pubDate></item></channel></rss>