<?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[C++ Hilfe!]]></title><description><![CDATA[<p>Hallo,<br />
ich bin ein c++ neuling (mein 1. tag) und habe eine Frage. Wir machen c++ in der schule durch und haben eine aufgabe bekommen, eine zahlenreihe von 100-1 zu machen, und einen kleinen &quot;dialog&quot;. jetzt bekomme ich immer einen error raus, und weiß nicht was zu tun ist. ich bitte um Hilfe!<br />
danke im vorraus, niko</p>
<p>#include &lt;iostream&gt;</p>
<p>using namespace std;</p>
<p>int main()</p>
<p>{<br />
int zahl, i;</p>
<p>zahl = 100;</p>
<p>while(zahl&gt;=0);</p>
<p>{</p>
<p>cout &lt;&lt; zahl &lt;&lt; endl;<br />
zahl = zahl-1;</p>
<p>cout &lt;&lt; &quot;Bitte geben sie eine Zahl ein: &quot;;<br />
cin &gt;&gt; i;<br />
cout &lt;&lt; &quot;Die Zahl die sie eingegeben haben ist &quot; &lt;&lt; i &lt;&lt; endl;<br />
cout &lt;&lt; &quot;Das Doppelte ist &quot; &lt;&lt; i*2;<br />
cout &lt;&lt; &quot; und die Haelfte ist &quot; &lt;&lt; i/2 &lt;&lt; endl;</p>
<p>}</p>
<p>return 0;</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/294409/c-hilfe</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 22:38:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/294409.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Oct 2011 16:54:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 16:54:20 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich bin ein c++ neuling (mein 1. tag) und habe eine Frage. Wir machen c++ in der schule durch und haben eine aufgabe bekommen, eine zahlenreihe von 100-1 zu machen, und einen kleinen &quot;dialog&quot;. jetzt bekomme ich immer einen error raus, und weiß nicht was zu tun ist. ich bitte um Hilfe!<br />
danke im vorraus, niko</p>
<p>#include &lt;iostream&gt;</p>
<p>using namespace std;</p>
<p>int main()</p>
<p>{<br />
int zahl, i;</p>
<p>zahl = 100;</p>
<p>while(zahl&gt;=0);</p>
<p>{</p>
<p>cout &lt;&lt; zahl &lt;&lt; endl;<br />
zahl = zahl-1;</p>
<p>cout &lt;&lt; &quot;Bitte geben sie eine Zahl ein: &quot;;<br />
cin &gt;&gt; i;<br />
cout &lt;&lt; &quot;Die Zahl die sie eingegeben haben ist &quot; &lt;&lt; i &lt;&lt; endl;<br />
cout &lt;&lt; &quot;Das Doppelte ist &quot; &lt;&lt; i*2;<br />
cout &lt;&lt; &quot; und die Haelfte ist &quot; &lt;&lt; i/2 &lt;&lt; endl;</p>
<p>}</p>
<p>return 0;</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2135247</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135247</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 24 Oct 2011 16:54:20 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 16:56:44 GMT]]></title><description><![CDATA[<p>Semikolon hinter while ist fehl am Platz.</p>
<p>Willst Du den Benutzer wirklich 100 Zahlen eingeben lassen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2135248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135248</guid><dc:creator><![CDATA[Jajajajaja]]></dc:creator><pubDate>Mon, 24 Oct 2011 16:56:44 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 16:59:11 GMT]]></title><description><![CDATA[<p>nein, ich will das nicht.<br />
ich will das die zahlenreihe kommt, und dann soll der dialog kommen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2135250</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135250</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 24 Oct 2011 16:59:11 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 17:05:53 GMT]]></title><description><![CDATA[<p>ok ich habs schon, danke trotzdem</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2135255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135255</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 24 Oct 2011 17:05:53 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 17:09:51 GMT]]></title><description><![CDATA[<p>Meinst du so?</p>
<pre><code class="language-cpp">int main()
{
    int zahl = 100;
    while(zahl&gt;=0) // hier kommt kein ';' denn sonst wäre die Schleife hier schon zu Ende ...
    {
        cout &lt;&lt; zahl &lt;&lt; '\n'; // Nimm lieber \n.
        --zahl; // entspricht zahl=zahl-1
    } // ... sie soll ja aber erst hier zu Ende sein.

    int i;
    cout &lt;&lt; &quot;Bitte geben sie eine Zahl ein: &quot;;
    cin &gt;&gt; i;
    cout &lt;&lt; &quot;Die Zahl die sie eingegeben haben ist &quot; &lt;&lt; i;
    cout &lt;&lt; &quot;\nDas Doppelte ist &quot; &lt;&lt; i*2;
    cout &lt;&lt; &quot; und die Haelfte ist &quot; &lt;&lt; i/2; // Vielleicht magst du lieber eine Fließkommazahl nehmen.

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2135258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135258</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 24 Oct 2011 17:09:51 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 17:13:35 GMT]]></title><description><![CDATA[<p>wie kann ich wenn ich z.B 5 eingebe: die Hälfte ist 2,5. es kommt aber immer 2 raus.<br />
wie soll ich das schreiben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2135260</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135260</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 24 Oct 2011 17:13:35 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 17:16:14 GMT]]></title><description><![CDATA[<p>Gugelmoser schrieb:</p>
<blockquote>
<pre><code class="language-cpp">cout &lt;&lt; &quot; und die Haelfte ist &quot; &lt;&lt; i/2; // Vielleicht magst du lieber eine Fließkommazahl nehmen.
</code></pre>
</blockquote>
<p>Wenn du eine Ganzahl durch eine Ganzzahl teilst bekommst du eine Ganzzahl. Willst du keine Ganzzahl musst du eine Fließkommazahl(float, double) nehmen. Sprich double i;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2135261</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135261</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 24 Oct 2011 17:16:14 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 17:17:03 GMT]]></title><description><![CDATA[<p>So:</p>
<pre><code class="language-cpp">cout &lt;&lt; &quot; und die Haelfte ist &quot; &lt;&lt; i/2.0;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2135262</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135262</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Mon, 24 Oct 2011 17:17:03 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 17:19:07 GMT]]></title><description><![CDATA[<p>Entweder du nimmst gleich double für deine Variable (dann kann man auch Kommazahlen eingeben; beachte . statt ,), oder du schreibst</p>
<pre><code class="language-cpp">i / 2.0 //Jetzt keine Integer-Division mehr, sondern Gleitkomma-Division
</code></pre>
<p>MfG</p>
<p>EDIT: Ich hasse es zu langsam zu sein <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/2135263</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135263</guid><dc:creator><![CDATA[Jonas OSDever]]></dc:creator><pubDate>Mon, 24 Oct 2011 17:19:07 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 17:20:14 GMT]]></title><description><![CDATA[<p>vielen dank für die zahlreichen antworten!</p>
<p>Mfg Niko</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2135265</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135265</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 24 Oct 2011 17:20:14 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Hilfe! on Mon, 24 Oct 2011 19:43:40 GMT]]></title><description><![CDATA[<p>@Niko.S</p>
<p>Schau dir vll. noch die FOR-Schleife an, die ist auch ganz nett. <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>
]]></description><link>https://www.c-plusplus.net/forum/post/2135335</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2135335</guid><dc:creator><![CDATA[arb3r]]></dc:creator><pubDate>Mon, 24 Oct 2011 19:43:40 GMT</pubDate></item></channel></rss>