<?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[Danke sehr erledigt Lösung:]]></title><description><![CDATA[<p>/*Aufgabe 2.11<br />
Lesen Sie eine double Zahl ein und bestimmen Sie, ob der Benutzer eine ganze Zahl eingegeben hat oder nicht.</p>
<p>z.B. Eingabe: 3.7 Ausgabe: Keine ganze Zahl. Eingabe: 5 Ausgabe: Eine ganze Zahl.<br />
*/</p>
<p>#include &lt;iostream&gt;<br />
using namespace std;<br />
int main()</p>
<p>{<br />
double a;<br />
int b;</p>
<p>cout&lt;&lt;&quot;Bitte Zahl eingeben&quot;&lt;&lt;endl;<br />
cin&gt;&gt;a;</p>
<p>b=int(a);</p>
<p>if(a==b)<br />
cout&lt;&lt;&quot;Eine ganze Zahl wurde eingegeben&quot;&lt;&lt;endl;<br />
if(a!=b)<br />
cout&lt;&lt;&quot;Keine ganze Zahl wurde eingegeben&quot;&lt;&lt;endl;</p>
<p>cin&gt;&gt;a;<br />
}<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/289193/danke-sehr-erledigt-lösung</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 08:53:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/289193.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 29 Jun 2011 20:11:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Danke sehr erledigt Lösung: on Wed, 29 Jun 2011 20:21:29 GMT]]></title><description><![CDATA[<p>/*Aufgabe 2.11<br />
Lesen Sie eine double Zahl ein und bestimmen Sie, ob der Benutzer eine ganze Zahl eingegeben hat oder nicht.</p>
<p>z.B. Eingabe: 3.7 Ausgabe: Keine ganze Zahl. Eingabe: 5 Ausgabe: Eine ganze Zahl.<br />
*/</p>
<p>#include &lt;iostream&gt;<br />
using namespace std;<br />
int main()</p>
<p>{<br />
double a;<br />
int b;</p>
<p>cout&lt;&lt;&quot;Bitte Zahl eingeben&quot;&lt;&lt;endl;<br />
cin&gt;&gt;a;</p>
<p>b=int(a);</p>
<p>if(a==b)<br />
cout&lt;&lt;&quot;Eine ganze Zahl wurde eingegeben&quot;&lt;&lt;endl;<br />
if(a!=b)<br />
cout&lt;&lt;&quot;Keine ganze Zahl wurde eingegeben&quot;&lt;&lt;endl;</p>
<p>cin&gt;&gt;a;<br />
}<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2086295</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2086295</guid><dc:creator><![CDATA[markuswenczel]]></dc:creator><pubDate>Wed, 29 Jun 2011 20:21:29 GMT</pubDate></item><item><title><![CDATA[Reply to Danke sehr erledigt Lösung: on Wed, 29 Jun 2011 20:18:46 GMT]]></title><description><![CDATA[<p>Du könntest die Eingabe per Cast in einen int umwandeln und dann mit dem Eingabewert vergleichen. Eine Alternative wäre noch fmod().</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2086303</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2086303</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 29 Jun 2011 20:18:46 GMT</pubDate></item></channel></rss>