<?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[ausgabe umkehren (von hinten nach vorne)]]></title><description><![CDATA[<p>tach,</p>
<p>ich hab gerade n programm geschireben das dezimalzahlen in dualzahlen (binär) umrechnet.</p>
<pre><code class="language-cpp">void main()
{
   int x=1,z;
   cout&lt;&lt;&quot;geben sie bitte eine dezimalzahl ein: &quot;;
   cin&gt;&gt;x;
   while(x&gt;0)
   {
       z=x%2;
       x=x/2;

       cout&lt;&lt;z;
   };
}
</code></pre>
<p>das programm funktioniert auch, aber es gibt den binärcode von hinten nach vorne aus.<br />
z.B. für 19 gibt er 11001 aus. richtig wäre 10011, also genau anderst herum.<br />
wie kann ich die ausgabe &quot;umdrehen&quot;?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/86397/ausgabe-umkehren-von-hinten-nach-vorne</link><generator>RSS for Node</generator><lastBuildDate>Fri, 03 Jul 2026 18:29:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/86397.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 Sep 2004 10:52:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ausgabe umkehren (von hinten nach vorne) on Sun, 19 Sep 2004 10:52:54 GMT]]></title><description><![CDATA[<p>tach,</p>
<p>ich hab gerade n programm geschireben das dezimalzahlen in dualzahlen (binär) umrechnet.</p>
<pre><code class="language-cpp">void main()
{
   int x=1,z;
   cout&lt;&lt;&quot;geben sie bitte eine dezimalzahl ein: &quot;;
   cin&gt;&gt;x;
   while(x&gt;0)
   {
       z=x%2;
       x=x/2;

       cout&lt;&lt;z;
   };
}
</code></pre>
<p>das programm funktioniert auch, aber es gibt den binärcode von hinten nach vorne aus.<br />
z.B. für 19 gibt er 11001 aus. richtig wäre 10011, also genau anderst herum.<br />
wie kann ich die ausgabe &quot;umdrehen&quot;?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/610266</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/610266</guid><dc:creator><![CDATA[G-ast]]></dc:creator><pubDate>Sun, 19 Sep 2004 10:52:54 GMT</pubDate></item><item><title><![CDATA[Reply to ausgabe umkehren (von hinten nach vorne) on Sun, 19 Sep 2004 11:30:38 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich drehe Strings immer mit &quot;strrev&quot; um.</p>
<p>Gruß<br />
ravel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/610294</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/610294</guid><dc:creator><![CDATA[Ravel]]></dc:creator><pubDate>Sun, 19 Sep 2004 11:30:38 GMT</pubDate></item></channel></rss>