<?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[Float formatieren ?]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie kann ich eine funktion die einen float zurückgibt so erstellen das genau 2 stellen zurückgegeben werden ?</p>
<p>Also</p>
<pre><code class="language-cpp">float test()
{
  return(1.11*2.22);
}
</code></pre>
<p>es soll nicht 2.4642 sondern 2.46 zurückgegeben werden , aber als float , nicht<br />
als string.</p>
<p>Matthias</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/170600/float-formatieren</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 04:49:03 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/170600.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 17 Jan 2007 19:16:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Float formatieren ? on Wed, 17 Jan 2007 19:16:59 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie kann ich eine funktion die einen float zurückgibt so erstellen das genau 2 stellen zurückgegeben werden ?</p>
<p>Also</p>
<pre><code class="language-cpp">float test()
{
  return(1.11*2.22);
}
</code></pre>
<p>es soll nicht 2.4642 sondern 2.46 zurückgegeben werden , aber als float , nicht<br />
als string.</p>
<p>Matthias</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211589</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211589</guid><dc:creator><![CDATA[STF-DIR]]></dc:creator><pubDate>Wed, 17 Jan 2007 19:16:59 GMT</pubDate></item><item><title><![CDATA[Reply to Float formatieren ? on Wed, 17 Jan 2007 19:18:02 GMT]]></title><description><![CDATA[<p>Geht nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211590</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211590</guid><dc:creator><![CDATA[Entenwickler]]></dc:creator><pubDate>Wed, 17 Jan 2007 19:18:02 GMT</pubDate></item><item><title><![CDATA[Reply to Float formatieren ? on Wed, 17 Jan 2007 19:23:18 GMT]]></title><description><![CDATA[<p>geht schon ... aber nur umständlich ..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211594</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211594</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Wed, 17 Jan 2007 19:23:18 GMT</pubDate></item><item><title><![CDATA[Reply to Float formatieren ? on Wed, 17 Jan 2007 19:26:36 GMT]]></title><description><![CDATA[<p>STF-DIR schrieb:</p>
<blockquote>
<p>[...] float [...] genau [...]</p>
</blockquote>
<p>--&gt; Geht nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211597</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211597</guid><dc:creator><![CDATA[Entenwickler]]></dc:creator><pubDate>Wed, 17 Jan 2007 19:26:36 GMT</pubDate></item><item><title><![CDATA[Reply to Float formatieren ? on Wed, 17 Jan 2007 20:28:46 GMT]]></title><description><![CDATA[<p>gibs als integer zurück und teil das ergebnis durch 100 <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/1211619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211619</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Wed, 17 Jan 2007 20:28:46 GMT</pubDate></item><item><title><![CDATA[Reply to Float formatieren ? on Thu, 18 Jan 2007 09:43:06 GMT]]></title><description><![CDATA[<p>Auch dann könnten es statt 2.46 2.46000001 sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211830</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211830</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 18 Jan 2007 09:43:06 GMT</pubDate></item><item><title><![CDATA[Reply to Float formatieren ? on Fri, 19 Jan 2007 09:08:38 GMT]]></title><description><![CDATA[<p>Warum soll das nicht gehen?<br />
Binde einfach die &lt;iostream&gt; -Bib. rein und passe deine Ausgabe mit</p>
<pre><code class="language-cpp">cout.precision[2]
</code></pre>
<p>an.<br />
Die zwei im obigem Beispiel steht für die Anzahl der Stellen.</p>
<p>Grüße, Newproggie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1212471</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1212471</guid><dc:creator><![CDATA[W0lf]]></dc:creator><pubDate>Fri, 19 Jan 2007 09:08:38 GMT</pubDate></item><item><title><![CDATA[Reply to Float formatieren ? on Fri, 19 Jan 2007 10:10:06 GMT]]></title><description><![CDATA[<p>NewProggie schrieb:</p>
<blockquote>
<p>Warum soll das nicht gehen?<br />
Binde einfach die &lt;iostream&gt; -Bib. rein und passe deine Ausgabe mit</p>
<pre><code class="language-cpp">cout.precision[2]
</code></pre>
<p>an.<br />
Die zwei im obigem Beispiel steht für die Anzahl der Stellen.</p>
<p>Grüße, Newproggie</p>
</blockquote>
<blockquote>
<p>es soll nicht 2.4642 sondern 2.46 zurückgegeben werden , aber <strong>als float , nicht<br />
als string.</strong></p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1212515</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1212515</guid><dc:creator><![CDATA[Knuddlbaer]]></dc:creator><pubDate>Fri, 19 Jan 2007 10:10:06 GMT</pubDate></item><item><title><![CDATA[Reply to Float formatieren ? on Fri, 19 Jan 2007 10:31:58 GMT]]></title><description><![CDATA[<p>Knuddlbaer schrieb:</p>
<blockquote>
<p>NewProggie schrieb:</p>
<blockquote>
<p>Warum soll das nicht gehen?<br />
Binde einfach die &lt;iostream&gt; -Bib. rein und passe deine Ausgabe mit</p>
<pre><code class="language-cpp">cout.precision[2]
</code></pre>
<p>an.<br />
Die zwei im obigem Beispiel steht für die Anzahl der Stellen.</p>
<p>Grüße, Newproggie</p>
</blockquote>
<blockquote>
<p>es soll nicht 2.4642 sondern 2.46 zurückgegeben werden , aber <strong>als float , nicht<br />
als string.</strong></p>
</blockquote>
</blockquote>
<p>atoi?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1212528</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1212528</guid><dc:creator><![CDATA[W0lf]]></dc:creator><pubDate>Fri, 19 Jan 2007 10:31:58 GMT</pubDate></item></channel></rss>