<?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[einlesen und Ausgabe]]></title><description><![CDATA[<p>Hallo leute ich möchte mit dem datentypen int eine grösse von der tastatur einlesen und dann auch ausgeben .</p>
<p>Mein ansatz:</p>
<p>#include &lt;cstdlib&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;iomanip&gt;</p>
<p>using namespace std;</p>
<p>int main()<br />
{</p>
<p>int Zahl = a;</p>
<p>cout &lt;&lt; &quot;Geben sie eine Zahl ein !&quot; &lt;&lt; &quot;Zahl&quot; &lt;&lt;endl;</p>
<p>cin&gt;&gt; Zahl;</p>
<p>system(&quot;PAUSE&quot;);<br />
return EXIT_SUCCESS;<br />
}<br />
Ich habe gerade mit programmieren angefangen .</p>
<p>Was muss ich genau noch an meinem programm ändern das es funktioniert?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/313791/einlesen-und-ausgabe</link><generator>RSS for Node</generator><lastBuildDate>Sat, 01 Aug 2026 22:36:43 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/313791.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 10 Feb 2013 21:09:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to einlesen und Ausgabe on Sun, 10 Feb 2013 21:09:27 GMT]]></title><description><![CDATA[<p>Hallo leute ich möchte mit dem datentypen int eine grösse von der tastatur einlesen und dann auch ausgeben .</p>
<p>Mein ansatz:</p>
<p>#include &lt;cstdlib&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;iomanip&gt;</p>
<p>using namespace std;</p>
<p>int main()<br />
{</p>
<p>int Zahl = a;</p>
<p>cout &lt;&lt; &quot;Geben sie eine Zahl ein !&quot; &lt;&lt; &quot;Zahl&quot; &lt;&lt;endl;</p>
<p>cin&gt;&gt; Zahl;</p>
<p>system(&quot;PAUSE&quot;);<br />
return EXIT_SUCCESS;<br />
}<br />
Ich habe gerade mit programmieren angefangen .</p>
<p>Was muss ich genau noch an meinem programm ändern das es funktioniert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2297676</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297676</guid><dc:creator><![CDATA[Kyle21]]></dc:creator><pubDate>Sun, 10 Feb 2013 21:09:27 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Sun, 10 Feb 2013 22:05:35 GMT]]></title><description><![CDATA[<p>1. Was soll a für eine Zahl sein?</p>
<p>2. &quot;Zahl&quot; ist ein String. Zahl ist eine Variable.</p>
<p>3. wenn du die eigenlesene Zahl wieder ausgeben willst, solltest du die Ausgabe auch danach machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2297692</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297692</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Sun, 10 Feb 2013 22:05:35 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Sun, 10 Feb 2013 23:07:49 GMT]]></title><description><![CDATA[<p>Muss ich einen string noch definieren oder wie?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2297707</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297707</guid><dc:creator><![CDATA[Kyle21]]></dc:creator><pubDate>Sun, 10 Feb 2013 23:07:49 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Sun, 10 Feb 2013 23:46:36 GMT]]></title><description><![CDATA[<p>Kyle21 schrieb:</p>
<blockquote>
<p>Muss ich einen string noch definieren oder wie?</p>
</blockquote>
<p>Nö. Du musst nur einen int definieren, eine Zahl einlesen, und eine Zahl ausgeben:</p>
<pre><code>cout &lt;&lt; &quot;Bitte Zahl eingeben: &quot;;
int zahl;
cin &gt;&gt; zahl;
cout &lt;&lt; &quot;Ihre Zahl ist: &quot; &lt;&lt; zahl;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2297715</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297715</guid><dc:creator><![CDATA[out]]></dc:creator><pubDate>Sun, 10 Feb 2013 23:46:36 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Mon, 11 Feb 2013 10:56:59 GMT]]></title><description><![CDATA[<p>Hallo leute ich habe gerade funktioniert eine Zahl auszugeben und es hatte funktioniert.</p>
<p>Aber jetzt wollte ich irgendwie versuchen , das man zwei Zwei Zahlen eingibt und das zwei Zahlen ausgegeben werden z.B einmal links und einmal rechts.</p>
<p>Wasrum funktioniert das nicht?</p>
<p>#include &lt;cstdlib&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;iomanip&gt;</p>
<p>using namespace std;</p>
<p>int main()<br />
{</p>
<p>int Zahl1;</p>
<p>int Zahl2;</p>
<p>cout &lt;&lt; &quot;Geben sie eine Zahl ein !&quot; &lt;&lt; &quot;Zahl1&quot; &lt;&lt;endl;</p>
<p>cout &lt;&lt; &quot; Geben sie eine zweite Zahl ein &quot;&quot; &lt;&lt; &quot; Zahl2 &quot; &lt;&lt; endl;</p>
<p>cin&gt;&gt; Zahl;</p>
<p>cout &lt;&lt; setw(5) &lt;&lt; right &lt;&lt;showpos &lt;&lt; Zahl1 &lt;&lt; dec &lt;&lt; endl;</p>
<p>cout &lt;&lt; setw(5) &lt;&lt; left &lt;&lt;showpos &lt;&lt; Zahl1 &lt;&lt; dec &lt;&lt; endl;</p>
<p>system(&quot;PAUSE&quot;);<br />
return EXIT_SUCCESS;<br />
return 0;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2297803</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297803</guid><dc:creator><![CDATA[Kyle21]]></dc:creator><pubDate>Mon, 11 Feb 2013 10:56:59 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Mon, 11 Feb 2013 11:12:58 GMT]]></title><description><![CDATA[<p>Einen kleinen Fehler habe ich schon gefunden aber es scheint irgendwas immer nocn nicht zu funzen:<br />
#include &lt;cstdlib&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;iomanip&gt;</p>
<p>using namespace std;</p>
<p>int main()<br />
{</p>
<p>int Zahl1;</p>
<p>cout &lt;&lt; &quot;Geben sie eine Zahl ein !&quot; &lt;&lt; &quot;Zahl1&quot; &lt;&lt;endl;</p>
<p>cout &lt;&lt; &quot; Geben sie eine zweite Zahl ein &quot;&lt;&lt; &quot;Zahl2&quot; &lt;&lt; endl;</p>
<p>cin&gt;&gt; Zahl1;</p>
<p>cin &gt;&gt; Zahl2;</p>
<p>cout &lt;&lt; setw(5) &lt;&lt; right &lt;&lt;showpos &lt;&lt; Zahl1 &lt;&lt; dec &lt;&lt; endl;</p>
<p>cout &lt;&lt; setw(5) &lt;&lt; left &lt;&lt;showpos &lt;&lt; Zahl1 &lt;&lt; dec &lt;&lt; endl;</p>
<p>system(&quot;PAUSE&quot;);<br />
return EXIT_SUCCESS;<br />
return 0;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2297813</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297813</guid><dc:creator><![CDATA[Kyle21]]></dc:creator><pubDate>Mon, 11 Feb 2013 11:12:58 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Mon, 11 Feb 2013 12:39:37 GMT]]></title><description><![CDATA[<p>&lt;Ich hab jetzt ein wenig weiter probiert , aber mein scheint die zweite Zahl nicht zu erkennen.</p>
<p>Warum?</p>
<p>#include &lt;cstdlib&gt;<br />
#include &lt;iostream&gt;<br />
#include &lt;iomanip&gt;</p>
<p>using namespace std;</p>
<p>int main()<br />
{</p>
<p>int Zahl1;</p>
<p>int Zahl2;</p>
<p>cout &lt;&lt; &quot;Geben sie eine Zahl ein !&quot; &lt;&lt; &quot;Zahl1&quot; &lt;&lt;endl;</p>
<p>cin&gt;&gt; Zahl1;</p>
<p>cout &lt;&lt; &quot; Geben sie eine zweite Zahl ein &quot;&lt;&lt; &quot;Zahl2&quot; &lt;&lt; endl;</p>
<p>cin&gt;&gt; Zahl2;</p>
<p>cout &lt;&lt; setw(5) &lt;&lt; right &lt;&lt;showpos &lt;&lt; Zahl1 &lt;&lt; dec &lt;&lt; endl;</p>
<p>cout &lt;&lt; setw(5) &lt;&lt; left &lt;&lt;showpos &lt;&lt; Zahl1 &lt;&lt; dec &lt;&lt; endl;</p>
<p>system(&quot;PAUSE&quot;);<br />
return EXIT_SUCCESS;<br />
return 0;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2297852</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297852</guid><dc:creator><![CDATA[Kyle21]]></dc:creator><pubDate>Mon, 11 Feb 2013 12:39:37 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Mon, 11 Feb 2013 12:48:30 GMT]]></title><description><![CDATA[<p>Was hältst du von Codetags? Sieht da so nicht ein wenig übersichtlicher aus:</p>
<pre><code>#include &lt;cstdlib&gt;  // wo benötigst du diesen Header in deinem Quielltext?
#include &lt;iostream&gt;
#include &lt;iomanip&gt;

using namespace std;

int main()
{
  int Zahl1;
  int Zahl2;

  cout &lt;&lt; &quot;Geben sie eine Zahl ein !&quot; &lt;&lt; &quot;Zahl1&quot; &lt;&lt;endl;
  cin&gt;&gt; Zahl1;

  cout &lt;&lt; &quot; Geben sie eine zweite Zahl ein &quot;&lt;&lt; &quot;Zahl2&quot; &lt;&lt; endl;
  cin&gt;&gt; Zahl2;

  cout &lt;&lt; setw(5) &lt;&lt; right &lt;&lt;showpos &lt;&lt; Zahl1 &lt;&lt; dec &lt;&lt; endl;
  cout &lt;&lt; setw(5) &lt;&lt; left &lt;&lt;showpos &lt;&lt; Zahl1 &lt;&lt; dec &lt;&lt; endl;   // lies dir diese Zeile noch mal durch!

  system(&quot;PAUSE&quot;);  // es gibt bessere Ideen - siehe FAQ
  return EXIT_SUCCESS;  // In C++ unüblich - C-Relikt
  return 0;  // wegen dem return in der Zeile drüber wird diese hier nicht erreicht!
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2297857</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297857</guid><dc:creator><![CDATA[f.-th.]]></dc:creator><pubDate>Mon, 11 Feb 2013 12:48:30 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Mon, 11 Feb 2013 13:13:24 GMT]]></title><description><![CDATA[<p>lol danke der fehler war aber auch so blöd.</p>
<p>Eih leute könnt ihr mir eigentlich ne gute ide für C++ empfehlen .</p>
<p>Ich habe devc++ im moment und daher auch das zeug mit system pause usw unten stehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2297862</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297862</guid><dc:creator><![CDATA[Kyle21]]></dc:creator><pubDate>Mon, 11 Feb 2013 13:13:24 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Mon, 11 Feb 2013 15:20:23 GMT]]></title><description><![CDATA[<p>Kyle21 schrieb:</p>
<blockquote>
<p>lol danke der fehler war aber auch so blöd.</p>
<p>Eih leute könnt ihr mir eigentlich ne gute ide für C++ empfehlen .</p>
<p>Ich habe devc++ im moment und daher auch das zeug mit system pause usw unten stehen.</p>
</blockquote>
<p>Wenn du Windows benutzt, dann nimm Visual C++ 2010 Express. Ob es mittlerweile eine Visual C++ 2012 Express gibt, weiß ich nicht. Aber mit der 2010er Version dürftest du als Anfänger auch sehr gut bedient sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2297929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297929</guid><dc:creator><![CDATA[out]]></dc:creator><pubDate>Mon, 11 Feb 2013 15:20:23 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Mon, 11 Feb 2013 16:55:54 GMT]]></title><description><![CDATA[<p>Kyle21 schrieb:</p>
<blockquote>
<p>Ich habe devc++ im moment und daher auch das zeug mit system pause usw unten stehen.</p>
</blockquote>
<p>Das eine hat mit dem anderen nix zu tun.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2297956</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2297956</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Mon, 11 Feb 2013 16:55:54 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Tue, 12 Feb 2013 12:31:12 GMT]]></title><description><![CDATA[<p>Du nutzt scheinbar noch die DEV vor Version 4.9.9.2</p>
<p>Es gibt da mehrere Nachfolge-Projekte.<br />
Beispiele:<br />
<a href="http://orwelldevcpp.blogspot.de/" rel="nofollow">http://orwelldevcpp.blogspot.de/</a><br />
<a href="http://www.codeblocks.org/" rel="nofollow">http://www.codeblocks.org/</a><br />
und weitere.</p>
<p>Aber auch bei dem alten DEV musst du nicht alles übernehmen, was der die vorschlägt. Probiere einfach aus was passiert, wenn du</p>
<pre><code>return EXIT_SUCCESS;
</code></pre>
<p>bei C++ Quelltext beim DEV weg lässt. <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>Ja, Microsoft VS C++ ist natürlich auch eine Möglichkeit unter Windows.<br />
Falls du allerdings auch C programmieren willst: Microsoft ging zwischendurch eigene Weg und ignorierte C99 weitgehend.</p>
<p>MfG f.-th.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2298196</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2298196</guid><dc:creator><![CDATA[f.-th.]]></dc:creator><pubDate>Tue, 12 Feb 2013 12:31:12 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Wed, 13 Feb 2013 11:00:23 GMT]]></title><description><![CDATA[<p>Ok leute ich hatte mich jetzt an bool dran gehängt , aber mein programm zeigt wieder mal Fehler an.</p>
<p>Ich hab auch gleichzeitig versucht mit string zu arbeiten.</p>
<p>Hab versucht mit büchern zu arbeiten.</p>
<p>SInd aber immer noch Fehler drin leider.</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;iomanip &gt;<br />
#include&lt; stringh &gt;<br />
using namespace std;</p>
<p>int main() {<br />
string s1 = &quot;Geben sie eine Zahl zwischen 1 bis 100 an!&quot;;</p>
<p>cin &gt;&gt; s1;</p>
<p>bool bedingung = true;</p>
<p>if(s1&gt;= 100){</p>
<p>bedingung = true;</p>
<p>cout &lt;&lt;setprecision(2)&lt;&lt;fixed&lt;&lt;setw(6)&lt;&lt; right &lt;&lt; s1 &lt;&lt; endl;</p>
<p>else() {<br />
bedingung = false;</p>
<p>cout &lt;&lt; &quot; Die angegebene Zahl ist zu gross!&quot;&lt;&lt; endl;<br />
}<br />
}</p>
<p>return 0;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2298555</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2298555</guid><dc:creator><![CDATA[Kyle21]]></dc:creator><pubDate>Wed, 13 Feb 2013 11:00:23 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Wed, 13 Feb 2013 11:22:13 GMT]]></title><description><![CDATA[<p>Was genau soll hier <code>bedingung</code> bringen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2298560</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2298560</guid><dc:creator><![CDATA[MarcoYolo]]></dc:creator><pubDate>Wed, 13 Feb 2013 11:22:13 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Wed, 13 Feb 2013 11:28:09 GMT]]></title><description><![CDATA[<p>Kyle21 schrieb:</p>
<blockquote>
<p>Ok leute ich hatte mich jetzt an bool dran gehängt , aber mein programm zeigt wieder mal Fehler an.</p>
<p>Ich hab auch gleichzeitig versucht mit string zu arbeiten.</p>
<p>Hab versucht mit büchern zu arbeiten.</p>
<p>SInd aber immer noch Fehler drin leider.</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;iomanip &gt;<br />
#include&lt; stringh &gt;<br />
using namespace std;</p>
<p>int main() {<br />
string s1 = &quot;Geben sie eine Zahl zwischen 1 bis 100 an!&quot;;</p>
<p>cin &gt;&gt; s1;</p>
<p>bool bedingung = true;</p>
<p>if(s1&gt;= 100){</p>
<p>bedingung = true;</p>
<p>cout &lt;&lt;setprecision(2)&lt;&lt;fixed&lt;&lt;setw(6)&lt;&lt; right &lt;&lt; s1 &lt;&lt; endl;</p>
<p>else() {<br />
bedingung = false;</p>
<p>cout &lt;&lt; &quot; Die angegebene Zahl ist zu gross!&quot;&lt;&lt; endl;<br />
}<br />
}</p>
<p>return 0;<br />
}</p>
</blockquote>
<p>1. Weshalb initialisierst du s1 mit einem Text ,weißt ihm danach aber per cin einen ganz anderen Text zu wo liegt der sinn darin?<br />
2. Wofür benötigst du bool? Geht dein Code evtl noch weiter und du verwendest es noch woanders,oder weshalb steht es da?<br />
3. Ich bin mir nicht sicher ,aber ich denke ,dass es nicht zulässig ist einfach zu schreiben if(s1&gt;= 100) ,bin mir dabei zwar nicht ganz sicher habs auch noch nicht probiert ,aber ich denke die Stringgröße( anzahl der eingegebenen Zeichen müsstest du wenn überhaupt mit einer Funktion überprüfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2298561</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2298561</guid><dc:creator><![CDATA[HeyDu11]]></dc:creator><pubDate>Wed, 13 Feb 2013 11:28:09 GMT</pubDate></item><item><title><![CDATA[Reply to einlesen und Ausgabe on Wed, 13 Feb 2013 15:55:12 GMT]]></title><description><![CDATA[<pre><code>#include &lt;iostream&gt;
#include &lt;iomanip &gt;
#include&lt; stringh &gt; // string ohne h da C++
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2298678</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2298678</guid><dc:creator><![CDATA[f.-th.]]></dc:creator><pubDate>Wed, 13 Feb 2013 15:55:12 GMT</pubDate></item></channel></rss>