<?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[Problem bei Ausgabe]]></title><description><![CDATA[<p>Hallo ich habe ein Problem bei der Ausgabe und zwar will ich das die Zahlen so ausgeben werden angenommen ich gebe 4 mal ein 111</p>
<p>Dann soll die Ausgabe so aussehen 777</p>
<p>Aber ich krieg das immer nur hin das die so auf dem Bilschirm ausgeben wird:</p>
<p>7<br />
7<br />
7</p>
<p>Hat wer eine Idee wie man das anders ausgeben lassen kann ?</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main()
{

char bin[256];
int wert_1;

int i = 0;

for (int counter=0;counter&lt;3;counter++)
{

       cout&lt;&lt;&quot;eingabe 1: &quot;;
       cin&gt;&gt;bin;

                for (wert_1 = i=0; bin[i]; i++)
                {
                        wert_1 = wert_1  * 2  + bin[i] - 48;
                }

                if (counter==3)
                {
                cout&lt;&lt;&quot;ok&quot;;
                }

                cout&lt;&lt;wert_1;
}

system(&quot;PAUSE&quot;);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/231684/problem-bei-ausgabe</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 19:04:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/231684.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 14 Jan 2009 08:39:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 08:39:17 GMT]]></title><description><![CDATA[<p>Hallo ich habe ein Problem bei der Ausgabe und zwar will ich das die Zahlen so ausgeben werden angenommen ich gebe 4 mal ein 111</p>
<p>Dann soll die Ausgabe so aussehen 777</p>
<p>Aber ich krieg das immer nur hin das die so auf dem Bilschirm ausgeben wird:</p>
<p>7<br />
7<br />
7</p>
<p>Hat wer eine Idee wie man das anders ausgeben lassen kann ?</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main()
{

char bin[256];
int wert_1;

int i = 0;

for (int counter=0;counter&lt;3;counter++)
{

       cout&lt;&lt;&quot;eingabe 1: &quot;;
       cin&gt;&gt;bin;

                for (wert_1 = i=0; bin[i]; i++)
                {
                        wert_1 = wert_1  * 2  + bin[i] - 48;
                }

                if (counter==3)
                {
                cout&lt;&lt;&quot;ok&quot;;
                }

                cout&lt;&lt;wert_1;
}

system(&quot;PAUSE&quot;);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1645083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645083</guid><dc:creator><![CDATA[ausgabe]]></dc:creator><pubDate>Wed, 14 Jan 2009 08:39:17 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 08:52:19 GMT]]></title><description><![CDATA[<p>Ich glaube cout schickt sozusagen immer ein ENTER hinterher. Also vorher in einen string kopieren und dann ausgeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1645086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645086</guid><dc:creator><![CDATA[oneill5000]]></dc:creator><pubDate>Wed, 14 Jan 2009 08:52:19 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 08:56:41 GMT]]></title><description><![CDATA[<p>Aber dann hab ich doch wieder das selbe Problem weil den Wert denn muss ich doch so oder so mit cout ausgeben oder? o_O</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1645092</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645092</guid><dc:creator><![CDATA[ausgabe]]></dc:creator><pubDate>Wed, 14 Jan 2009 08:56:41 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 08:58:57 GMT]]></title><description><![CDATA[<p>cout schickt KEIN Enter hinterher.<br />
cin ließt das enter aber glaube ich mit ein, aber warum benutzt du nicht einen std::string, anstatt des chararrays</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1645094</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645094</guid><dc:creator><![CDATA[vlad_tepesch]]></dc:creator><pubDate>Wed, 14 Jan 2009 08:58:57 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 09:06:02 GMT]]></title><description><![CDATA[<p>UNd warum soll in seinem Fall bei cout das eingelesene ENTER von cin eine Rolle spielen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1645098</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645098</guid><dc:creator><![CDATA[oneill5000]]></dc:creator><pubDate>Wed, 14 Jan 2009 09:06:02 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 09:05:44 GMT]]></title><description><![CDATA[<p>In der Aufgabe soll ein Array benutzt werden...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1645100</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645100</guid><dc:creator><![CDATA[ausgabe]]></dc:creator><pubDate>Wed, 14 Jan 2009 09:05:44 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 09:11:31 GMT]]></title><description><![CDATA[<p>Geht es vielleicht so in de3 Art?</p>
<pre><code class="language-cpp">#include &lt;iostream&gt; 
using namespace std; 

int main() 
{ 

char bin[256]; 
int wert_1;
stringstream ss;

int i = 0; 

for (int counter=0;counter&lt;3;counter++) 
{ 
       cout&lt;&lt;&quot;eingabe 1: &quot;; 
       cin&gt;&gt;bin; 

                for (wert_1 = i=0; bin[i]; i++) 
                { 
                        wert_1 = wert_1  * 2  + bin[i] - 48; 
                } 

                if (counter==3) 
                { 
                        cout&lt;&lt;ss&lt;&lt;&quot;ok&quot;; 
                }
                else
                        ss&lt;&lt;wert_1; 
} 

system(&quot;PAUSE&quot;); 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1645103</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645103</guid><dc:creator><![CDATA[oneill5000]]></dc:creator><pubDate>Wed, 14 Jan 2009 09:11:31 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 09:28:47 GMT]]></title><description><![CDATA[<p>Da kommt die Ausgabe leider auch nicht so formatiert wie ich es brauche <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Ich hab eben einfach mal der wert_1 Variable immer andere Variablen zu gewiesen.</p>
<p>dann könnte ich es richtig formatiert ausgeben aber das geht doch bestimmt auch noch irgendwie anders weil meine Lösung wäre ja doch recht umständlich ...</p>
<pre><code class="language-cpp">if (counter==0)
                      {
                       wert_1 = wert_0;
                      }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1645121</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645121</guid><dc:creator><![CDATA[ausgabe]]></dc:creator><pubDate>Wed, 14 Jan 2009 09:28:47 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 11:24:18 GMT]]></title><description><![CDATA[<p>Nimm das</p>
<pre><code class="language-cpp">cout&lt;&lt;&quot;eingabe 1: &quot;;
</code></pre>
<p>aus der for-Schleife heraus und stelle es vor die for-Schleife, dann kannst Du mehr als eine Binärzahl eingeben und abarbeiten.</p>
<pre><code>eingabe 1: 111 111 111 110
7 7 7 6
</code></pre>
<p>Welche Entwicklungsumgebung verwendest Du?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1645207</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645207</guid><dc:creator><![CDATA[Werner_logoff]]></dc:creator><pubDate>Wed, 14 Jan 2009 11:24:18 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 11:44:42 GMT]]></title><description><![CDATA[<p>Aber bei jeder Eingabe soll das Wort eingabe dort auch stehen <sub>_</sub></p>
<p>Entwicklungsumgebung: Borland C++ Builder 6</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1645227</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645227</guid><dc:creator><![CDATA[ausgabe]]></dc:creator><pubDate>Wed, 14 Jan 2009 11:44:42 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 11:57:25 GMT]]></title><description><![CDATA[<p>Ich habs fast geschafft.</p>
<p>Aber bei der letzden Ausgabe da soll der Punkt nicht mit ausgeben werden kann man den irgendwie löschen wenn der bei speicher[2] ist?</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std; 

int main() 
{ 

char bin[256];
int speicher[256];

int wert_1;

int i = 0; 

for (int counter=0;counter&lt;2;counter++)
{

cout&lt;&lt;&quot;eingabe 1: &quot;;
       cin&gt;&gt;bin;

                for (wert_1 = i=0; bin[i]; i++) 
                { 
                        wert_1 = wert_1  * 2  + bin[i] - 48; 
                } 

               speicher[counter] = wert_1;

}

        for (int counter=0;counter&lt;2;counter++)
        {

        cout&lt;&lt;speicher[counter]&lt;&lt;&quot;.&quot;;
        }

system(&quot;PAUSE&quot;); 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1645241</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645241</guid><dc:creator><![CDATA[ausgabe]]></dc:creator><pubDate>Wed, 14 Jan 2009 11:57:25 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 11:59:24 GMT]]></title><description><![CDATA[<p>ausgabe schrieb:</p>
<blockquote>
<p>Aber bei der letzden Ausgabe da soll der Punkt nicht mit ausgeben werden kann man den irgendwie löschen wenn der bei speicher[2] ist?</p>
</blockquote>
<p>Wie wärs, wenn du in der Schleife nur bis 1 ausgibst?</p>
<p>Übrigens wäre Einrückung einen Gedanken wert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1645243</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645243</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Wed, 14 Jan 2009 11:59:24 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 12:18:05 GMT]]></title><description><![CDATA[<p>Ach verdammt geht doch nicht -.-</p>
<p>Immer wenn die Zahlen größer als 9 sind gibt er es nicht richtig aus .......... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1645261</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645261</guid><dc:creator><![CDATA[ausgabe]]></dc:creator><pubDate>Wed, 14 Jan 2009 12:18:05 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 12:34:12 GMT]]></title><description><![CDATA[<p>JEEETTTZZZTT hab ich es aber geschafft enddllliiiccchh <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std; 

int main() 
{ 

char bin[256];
int speicher[4];
int wert_1;
int i = 0;

for (int counter = 0 ; counter&lt;4 ; counter ++ )
{
cout&lt;&lt;&quot;eingabe 1: &quot;;
       cin&gt;&gt;bin;

                for (wert_1 = i=0; bin[i]; i++) 
                { 
                        wert_1 = wert_1  * 2  + bin[i] - 48; 
                } 
                speicher[counter] = wert_1;
}

cout&lt;&lt;&quot;IP Adresse: &quot;;

for (int j=0;j&lt;3;j++)
{
cout&lt;&lt;speicher[j]&lt;&lt;&quot;.&quot;;
}

cout&lt;&lt;speicher[3];

system(&quot;PAUSE&quot;);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1645278</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645278</guid><dc:creator><![CDATA[ausgabe]]></dc:creator><pubDate>Wed, 14 Jan 2009 12:34:12 GMT</pubDate></item><item><title><![CDATA[Reply to Problem bei Ausgabe on Wed, 14 Jan 2009 13:07:15 GMT]]></title><description><![CDATA[<p>Wie gesagt: Einrückung. <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>
<p>Neben der Tatsache, dass sich so mehr Leute in diesem Forum deinen Code anschauen werden, hilft es dir auch selber bei der Übersicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1645311</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1645311</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Wed, 14 Jan 2009 13:07:15 GMT</pubDate></item></channel></rss>