<?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[Herausfinden ob Variable nachkommastellen hat]]></title><description><![CDATA[<p>Wie kann ich herausfinden ob Zahl Nachkommastellen hat:</p>
<pre><code class="language-cpp">float Zahl;
Zahl = 15 / 7;
</code></pre>
<p>MfG kevka</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/152335/herausfinden-ob-variable-nachkommastellen-hat</link><generator>RSS for Node</generator><lastBuildDate>Sun, 09 Aug 2026 01:30:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/152335.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Jul 2006 13:42:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 13:42:05 GMT]]></title><description><![CDATA[<p>Wie kann ich herausfinden ob Zahl Nachkommastellen hat:</p>
<pre><code class="language-cpp">float Zahl;
Zahl = 15 / 7;
</code></pre>
<p>MfG kevka</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1091816</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091816</guid><dc:creator><![CDATA[kevka]]></dc:creator><pubDate>Wed, 05 Jul 2006 13:42:05 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 13:43:28 GMT]]></title><description><![CDATA[<p>Sie hat keine, weil du eine Integerdivision machst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1091818</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091818</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 05 Jul 2006 13:43:28 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 13:49:25 GMT]]></title><description><![CDATA[<p>kevka schrieb:</p>
<blockquote>
<p>Wie kann ich herausfinden ob Zahl Nachkommastellen hat:</p>
<pre><code class="language-cpp">float Zahl;
Zahl = 15 / 7;
</code></pre>
<p>MfG kevka</p>
</blockquote>
<p>Was mir da spontan einfällt:</p>
<pre><code class="language-cpp">float f = 1.01f;

bool bIstGanzeZahl = (f == ceil (f));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1091827</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091827</guid><dc:creator><![CDATA[Neku]]></dc:creator><pubDate>Wed, 05 Jul 2006 13:49:25 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 13:52:42 GMT]]></title><description><![CDATA[<p>MFK schrieb:</p>
<blockquote>
<p>Sie hat keine, weil du eine Integerdivision machst.</p>
</blockquote>
<p>Und wie schaffe ich das dann?</p>
<p>Ich will nämlich herausfinden ob die vom benutzer eingegebene zahl z.B. durch 3 ohne Nachkommastelle teilbar ist.</p>
<p>MfG kvka</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1091829</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091829</guid><dc:creator><![CDATA[kevka]]></dc:creator><pubDate>Wed, 05 Jul 2006 13:52:42 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 13:53:47 GMT]]></title><description><![CDATA[<p>Dafür gibt es den Modulooperator (%), der liefert dir den Rest einer Division.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1091831</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091831</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 05 Jul 2006 13:53:47 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 13:56:03 GMT]]></title><description><![CDATA[<p>kevka schrieb:</p>
<blockquote>
<p>Ich will nämlich herausfinden ob die vom benutzer eingegebene zahl z.B. durch 3 ohne Nachkommastelle teilbar ist.</p>
</blockquote>
<p>Wenn es ums Teilen geht, bietet sich Modulo an</p>
<pre><code class="language-cpp">int zahl1 = 16;
int zahl2 = 3;
if (zahl1 % zahl2 != 0)
  // zaht1 nicht durch zahl2 teilbar
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1091836</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091836</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 05 Jul 2006 13:56:03 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 13:59:37 GMT]]></title><description><![CDATA[<p>Wie wäre es mit damit:</p>
<pre><code class="language-cpp">float x=StrToFloat(Edit1-&gt;Text);
if((float)x==(int)x)
{ Edit2-&gt;Text=&quot;keine Nachkommestellung&quot;; }
else
{ Edit2-&gt;Text=&quot;Nachkommestellung&quot;; }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1091841</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091841</guid><dc:creator><![CDATA[Wasserkocher]]></dc:creator><pubDate>Wed, 05 Jul 2006 13:59:37 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 14:00:33 GMT]]></title><description><![CDATA[<p>An was denkt ihr bei &quot;Nachkommestellung&quot;? :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1091845</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091845</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 05 Jul 2006 14:00:33 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 14:09:11 GMT]]></title><description><![CDATA[<p>lol <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /><br />
Es ist einfach viel zu heiß um gescheit zu denken^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1091851</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091851</guid><dc:creator><![CDATA[Wasserkocher]]></dc:creator><pubDate>Wed, 05 Jul 2006 14:09:11 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 14:34:48 GMT]]></title><description><![CDATA[<p>Joe_M. schrieb:</p>
<blockquote>
<p>kevka schrieb:</p>
<blockquote>
<p>Ich will nämlich herausfinden ob die vom benutzer eingegebene zahl z.B. durch 3 ohne Nachkommastelle teilbar ist.</p>
</blockquote>
<p>Wenn es ums Teilen geht, bietet sich Modulo an</p>
<pre><code class="language-cpp">int zahl1 = 16;
int zahl2 = 3;
if (zahl1 % zahl2 != 0)
  // zaht1 nicht durch zahl2 teilbar
</code></pre>
</blockquote>
<p>Danke es funktuioniert ich bin dabei ein Programm zu schreigben das Primzahlen herausfindet.</p>
<p>MfG kevka</p>
<p>Mich würde es jedoch noch interresieren ob es die Möglichkeit gibt Text den man beim C++ builder 6 in ein TRichedit einfügt bunt zu färben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1091871</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091871</guid><dc:creator><![CDATA[kevka]]></dc:creator><pubDate>Wed, 05 Jul 2006 14:34:48 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Wed, 05 Jul 2006 14:55:10 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>- Ein Thema ein Thread, ein Thread ein Thema.<br />
- BCB-Hilfe und Forumssuche benutzen. Insbesondere zu <em>TRichEdit::SelAttributes</em></p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1091899</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1091899</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 05 Jul 2006 14:55:10 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Thu, 06 Jul 2006 13:38:53 GMT]]></title><description><![CDATA[<p>danke ich habe ein einfach das Stichwort in die Suche eingegeben und dieses Beispiel erstellt:</p>
<pre><code class="language-cpp">void __fastcall TForm1::Button1Click(TObject *Sender)
{
RichEdit1-&gt;Lines-&gt;Add(Edit1-&gt;Text);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button2Click(TObject *Sender)
{
   RichEdit1-&gt;SelAttributes-&gt;Color = clRed;
  RichEdit1-&gt;SelAttributes-&gt;Height += 5;
  RichEdit1-&gt;Lines-&gt;Add(&quot;This line of text will be red. &quot;);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button3Click(TObject *Sender)
{
  RichEdit1-&gt;SelAttributes-&gt;Color = clBlue;
  RichEdit1-&gt;SelAttributes-&gt;Height += 5;
  RichEdit1-&gt;Lines-&gt;Add(&quot;This line of text will be blue. &quot;);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button4Click(TObject *Sender)
{
  RichEdit1-&gt;SelAttributes-&gt;Color = clGreen;
  RichEdit1-&gt;SelAttributes-&gt;Height += 5;
  RichEdit1-&gt;Lines-&gt;Add(&quot;This line of text will be green. &quot;);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button5Click(TObject *Sender)
{
  RichEdit1-&gt;SelAttributes-&gt;Color = clYellow;
  RichEdit1-&gt;SelAttributes-&gt;Height += 5;
  RichEdit1-&gt;Lines-&gt;Add(&quot;This line of text will be yellow. &quot;);
}
</code></pre>
<p>Damit kann ich aber nur Text in einer linie anderst formatieren wie mache ich das wenn ich zum beispiel das erste wort rot das zweite grün usw. haben will?</p>
<p>MfG kevka</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1092509</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1092509</guid><dc:creator><![CDATA[kevka]]></dc:creator><pubDate>Thu, 06 Jul 2006 13:38:53 GMT</pubDate></item><item><title><![CDATA[Reply to Herausfinden ob Variable nachkommastellen hat on Thu, 06 Jul 2006 13:47:13 GMT]]></title><description><![CDATA[<p>akari schrieb:</p>
<blockquote>
<p>Ein Thema ein Thread, ein Thread ein Thema.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1092517</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1092517</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Thu, 06 Jul 2006 13:47:13 GMT</pubDate></item></channel></rss>