<?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[mehrere Zeichen in Reihe ausgeben.]]></title><description><![CDATA[<p>ich brauche:</p>
<p>ein programm, bei dem ich eine zahl eingebe und das programm mir dann z.b. zahl mal &quot;*&quot; ausgibt. also z.b.</p>
<p>cin &gt;&gt; 5:</p>
<p>Ausgabe : *****</p>
<p>da ich noch totaler anfänger bin, habe ich einfach mal so was in der art versucht:</p>
<pre><code>int a;
cin &gt;&gt; a;
cout &lt;&lt; a * '*';
</code></pre>
<p>ging natürlich nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> , wie kann ich dass denn sonst machen?</p>
<p>bin froh über jeden noch so kleinen tipp, thx</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/252175/mehrere-zeichen-in-reihe-ausgeben</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 01:24:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/252175.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Oct 2009 19:02:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to mehrere Zeichen in Reihe ausgeben. on Thu, 15 Oct 2009 19:02:03 GMT]]></title><description><![CDATA[<p>ich brauche:</p>
<p>ein programm, bei dem ich eine zahl eingebe und das programm mir dann z.b. zahl mal &quot;*&quot; ausgibt. also z.b.</p>
<p>cin &gt;&gt; 5:</p>
<p>Ausgabe : *****</p>
<p>da ich noch totaler anfänger bin, habe ich einfach mal so was in der art versucht:</p>
<pre><code>int a;
cin &gt;&gt; a;
cout &lt;&lt; a * '*';
</code></pre>
<p>ging natürlich nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> , wie kann ich dass denn sonst machen?</p>
<p>bin froh über jeden noch so kleinen tipp, thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793073</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793073</guid><dc:creator><![CDATA[tankser]]></dc:creator><pubDate>Thu, 15 Oct 2009 19:02:03 GMT</pubDate></item><item><title><![CDATA[Reply to mehrere Zeichen in Reihe ausgeben. on Thu, 15 Oct 2009 19:06:34 GMT]]></title><description><![CDATA[<p>Hehe. Für dich wäre Python eher etwas, als C++. <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>So Sachen, die man so intuitiv lösen möchte gehen in C++ meist nicht. (Das hat natürlich seine nicht unberechtigten Gründe, aber darum geht es jetzt ja nicht).</p>
<p>Dafür brauchst du eine Schleife.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

int main ()
{
 int count = 0;

 std::cout &lt;&lt; &quot;Anzahl eingeben: &quot;;
 std:: cin &gt;&gt; count;

 for (int i = 0; i &lt; count; ++i)
  std::cout &lt;&lt; &quot;*&quot;;
}
</code></pre>
<p>Alledings rate ich dir ein gutes Anfängerbuch zu kaufen, weil solche Sachen werden erklärt und du lernst einiges mehr, als per Try &amp; Error.</p>
<p>Schau mal hier gibt es eine sehr schöne Auswahl, sowie Diskussion zu Anfängerbüchern:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-251551.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-251551.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793076</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793076</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Thu, 15 Oct 2009 19:06:34 GMT</pubDate></item><item><title><![CDATA[Reply to mehrere Zeichen in Reihe ausgeben. on Thu, 15 Oct 2009 19:21:14 GMT]]></title><description><![CDATA[<p>std::string hat dafür auch einen speziellen Konstruktor.</p>
<p>Das geht also auch:</p>
<pre><code class="language-cpp">int a;
cin &gt;&gt; a;
cout &lt;&lt; string(a,'*');
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1793082</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793082</guid><dc:creator><![CDATA[Nanyuki]]></dc:creator><pubDate>Thu, 15 Oct 2009 19:21:14 GMT</pubDate></item><item><title><![CDATA[Reply to mehrere Zeichen in Reihe ausgeben. on Thu, 15 Oct 2009 19:27:06 GMT]]></title><description><![CDATA[<p>danke vielmals!<br />
die schleife habe ich auch getestet, leider etwas zu kompliziert, darum habe ich die idee sofort wieder verworfen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> wäre im nachhinein ziemlich einfach gewesen... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>dass mit C++ bei mir ist so ne sache, ich mache das nicht ganz freiwillig, gehört zu meinem studium, buch hab ich auch.(C++ Primer Plus, Prata) aber trotzdem herzlichen dank!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793085</guid><dc:creator><![CDATA[tankser]]></dc:creator><pubDate>Thu, 15 Oct 2009 19:27:06 GMT</pubDate></item></channel></rss>