<?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[mehrstellige Zahlen ausgeben]]></title><description><![CDATA[<p>wie kann ich Zahlen mehrstellig ausgeben also zb:</p>
<p>00<br />
01<br />
02<br />
03</p>
<pre><code class="language-cpp">for (int i=0; i&lt;20; i++)
   cout &lt;&lt; i &lt;&lt; endl;
</code></pre>
<p>da gab es doch etwas was man vor die Variable schreiben musste, mir fällts aber nicht ein.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/257978/mehrstellige-zahlen-ausgeben</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 16:38:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/257978.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 05 Jan 2010 12:28:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to mehrstellige Zahlen ausgeben on Tue, 05 Jan 2010 12:28:18 GMT]]></title><description><![CDATA[<p>wie kann ich Zahlen mehrstellig ausgeben also zb:</p>
<p>00<br />
01<br />
02<br />
03</p>
<pre><code class="language-cpp">for (int i=0; i&lt;20; i++)
   cout &lt;&lt; i &lt;&lt; endl;
</code></pre>
<p>da gab es doch etwas was man vor die Variable schreiben musste, mir fällts aber nicht ein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1832881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1832881</guid><dc:creator><![CDATA[rudpower]]></dc:creator><pubDate>Tue, 05 Jan 2010 12:28:18 GMT</pubDate></item><item><title><![CDATA[Reply to mehrstellige Zahlen ausgeben on Tue, 05 Jan 2010 12:30:02 GMT]]></title><description><![CDATA[<p><a href="http://www.cplusplus.com/reference/iostream/ios/fill/" rel="nofollow">std::ios::fill?</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1832882</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1832882</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Tue, 05 Jan 2010 12:30:02 GMT</pubDate></item><item><title><![CDATA[Reply to mehrstellige Zahlen ausgeben on Wed, 06 Jan 2010 12:15:51 GMT]]></title><description><![CDATA[<p>ja aber ich hab ja mehrere Ausgaben in einer Zeile, damit geht das nicht.<br />
Da gab es irgend ein Präfix oder sowas.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1833577</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1833577</guid><dc:creator><![CDATA[rudpower]]></dc:creator><pubDate>Wed, 06 Jan 2010 12:15:51 GMT</pubDate></item><item><title><![CDATA[Reply to mehrstellige Zahlen ausgeben on Wed, 06 Jan 2010 12:18:39 GMT]]></title><description><![CDATA[<p>Keine Ahnung ob sowas mit der STL machbar ist, aber printf bietet dazu was an:</p>
<pre><code class="language-cpp">printf(&quot;%0.2i&quot;, i);
</code></pre>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1833581</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1833581</guid><dc:creator><![CDATA[theliquidwave]]></dc:creator><pubDate>Wed, 06 Jan 2010 12:18:39 GMT</pubDate></item><item><title><![CDATA[Reply to mehrstellige Zahlen ausgeben on Wed, 06 Jan 2010 12:22:49 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iomanip&gt;
...

cout &lt;&lt; setfill('0') &lt;&lt; setw(3) &lt;&lt; setprecision(1) &lt;&lt; whatever &lt;&lt; endl;
</code></pre>
<p>Siehe zB <a href="http://www.cppreference.com/wiki/io/io_flags" rel="nofollow">http://www.cppreference.com/wiki/io/io_flags</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1833584</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1833584</guid><dc:creator><![CDATA[Fellhuhn]]></dc:creator><pubDate>Wed, 06 Jan 2010 12:22:49 GMT</pubDate></item><item><title><![CDATA[Reply to mehrstellige Zahlen ausgeben on Wed, 06 Jan 2010 12:34:35 GMT]]></title><description><![CDATA[<p>setw() ist die Lösung. Vielen Dank für die schnelle Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1833592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1833592</guid><dc:creator><![CDATA[rudpower]]></dc:creator><pubDate>Wed, 06 Jan 2010 12:34:35 GMT</pubDate></item></channel></rss>