<?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[int länge ziffern ausgeben]]></title><description><![CDATA[<p>Hallo,<br />
ich möchte die einzelnen ziffern einer int zahl herausfinden.<br />
die max. länge der zahl ist unbestimmt.</p>
<p>vielleicht anzahl der ziffern herausfinden und dann in einer for-schleife<br />
die einzelnen ziffern verarbeiten?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/253114/int-länge-ziffern-ausgeben</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 02:10:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/253114.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Oct 2009 17:29:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to int länge ziffern ausgeben on Wed, 28 Oct 2009 17:29:56 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich möchte die einzelnen ziffern einer int zahl herausfinden.<br />
die max. länge der zahl ist unbestimmt.</p>
<p>vielleicht anzahl der ziffern herausfinden und dann in einer for-schleife<br />
die einzelnen ziffern verarbeiten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1799840</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1799840</guid><dc:creator><![CDATA[nicht registriert]]></dc:creator><pubDate>Wed, 28 Oct 2009 17:29:56 GMT</pubDate></item><item><title><![CDATA[Reply to int länge ziffern ausgeben on Wed, 28 Oct 2009 17:32:32 GMT]]></title><description><![CDATA[<p>Ich nehme gern im Wesentlichen diese Schleife.</p>
<pre><code class="language-cpp">do
   cout&lt;&lt;char(x%10+'0');
while(x/=10);
</code></pre>
<p>Aber sie liefert die Ziffern verkehrtherum und ich weiß vorher nicht, wieviele Ziffern und vielleicht noch andere Sachen, die Du nicht brauchen kannst.<br />
Das müßtest Du alles noch anpassen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1799843</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1799843</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Wed, 28 Oct 2009 17:32:32 GMT</pubDate></item><item><title><![CDATA[Reply to int länge ziffern ausgeben on Wed, 28 Oct 2009 17:35:52 GMT]]></title><description><![CDATA[<p>dev-cpp zeigt einen fehler an:<br />
`x' undeclared (first use this function)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1799847</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1799847</guid><dc:creator><![CDATA[nicht registriert]]></dc:creator><pubDate>Wed, 28 Oct 2009 17:35:52 GMT</pubDate></item><item><title><![CDATA[Reply to int länge ziffern ausgeben on Wed, 28 Oct 2009 17:57:23 GMT]]></title><description><![CDATA[<p>x ist ne Variable... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1799853</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1799853</guid><dc:creator><![CDATA[Kóyaánasqatsi]]></dc:creator><pubDate>Wed, 28 Oct 2009 17:57:23 GMT</pubDate></item><item><title><![CDATA[Reply to int länge ziffern ausgeben on Wed, 28 Oct 2009 18:34:43 GMT]]></title><description><![CDATA[<p>Wenn's andersrum sein soll, das ganze rückwärts in ein Array oder einen Vektor zu schreiben, ist ja trivial. Oder rekursiv abhandeln, etwa</p>
<pre><code class="language-cpp">void treat_number(int x) {
  if(x != 0) {
    treat_number(x / 10);
    // hier eigentlicher Code, beispielsweise
    std::cout &lt;&lt; x % 10 &lt;&lt; std::endl;
  }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1799874</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1799874</guid><dc:creator><![CDATA[seldon]]></dc:creator><pubDate>Wed, 28 Oct 2009 18:34:43 GMT</pubDate></item><item><title><![CDATA[Reply to int länge ziffern ausgeben on Wed, 28 Oct 2009 19:25:23 GMT]]></title><description><![CDATA[<p>Danke,<br />
funktioniert jetzt. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1799906</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1799906</guid><dc:creator><![CDATA[nicht registriert]]></dc:creator><pubDate>Wed, 28 Oct 2009 19:25:23 GMT</pubDate></item></channel></rss>