<?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[random]]></title><description><![CDATA[<p>moin....diesmla folgendes....<br />
ich weise eine caption einen zufallswert zu. dieser wert soll dann mehrere eedit komponenten verteilt werden bis die zahl der caption der summe derer in den edit komponenten entspricht.hab eine do while schleife probiert....</p>
<p>do{<br />
if((Form3-&gt;Edit1-&gt;Text.ToInt()+Form3-&gt;Edit4-&gt;Text.ToInt()+Form3-&gt;Edit7-&gt;Text.ToInt()+Form3-&gt;Edit10-&gt;Text.ToInt()+Form3-&gt;Edit13-&gt;Text.ToInt())&lt;(Label1-&gt;Caption.ToInt()))<br />
{<br />
Form3-&gt;Edit1-&gt;Text=random(Label1-&gt;Caption.ToInt());<br />
Form3-&gt;Edit4-&gt;Text=random(Label1-&gt;Caption.ToInt());<br />
Form3-&gt;Edit7-&gt;Text=random(Label1-&gt;Caption.ToInt());<br />
Form3-&gt;Edit10-&gt;Text=random(Label1-&gt;Caption.ToInt());<br />
Form3-&gt;Edit13-&gt;Text=random(Label1-&gt;Caption.ToInt());<br />
}<br />
else<br />
Form3-&gt;Caption=&quot;NIX&quot;;<br />
}<br />
while ((Form3-&gt;Edit1-&gt;Text.ToInt()+Form3-&gt;Edit4-&gt;Text.ToInt()+Form3-&gt;Edit7-&gt;Text.ToInt()+Form3-&gt;Edit10-&gt;Text.ToInt()+Form3-&gt;Edit13-&gt;Text.ToInt())==(Label1-&gt;Caption.ToInt()));<br />
Form3-&gt;Caption=Form3-&gt;Edit1-&gt;Text.ToInt()+Form3-&gt;Edit4-&gt;Text.ToInt()+Form3-&gt;Edit7-&gt;Text.ToInt()+Form3-&gt;Edit10-&gt;Text.ToInt()+Form3-&gt;Edit13-&gt;Text.ToInt();</p>
<p>nich lachen <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>
]]></description><link>https://www.c-plusplus.net/forum/topic/120018/random</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Jul 2026 05:16:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/120018.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Sep 2005 07:22:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to random on Thu, 08 Sep 2005 07:22:37 GMT]]></title><description><![CDATA[<p>moin....diesmla folgendes....<br />
ich weise eine caption einen zufallswert zu. dieser wert soll dann mehrere eedit komponenten verteilt werden bis die zahl der caption der summe derer in den edit komponenten entspricht.hab eine do while schleife probiert....</p>
<p>do{<br />
if((Form3-&gt;Edit1-&gt;Text.ToInt()+Form3-&gt;Edit4-&gt;Text.ToInt()+Form3-&gt;Edit7-&gt;Text.ToInt()+Form3-&gt;Edit10-&gt;Text.ToInt()+Form3-&gt;Edit13-&gt;Text.ToInt())&lt;(Label1-&gt;Caption.ToInt()))<br />
{<br />
Form3-&gt;Edit1-&gt;Text=random(Label1-&gt;Caption.ToInt());<br />
Form3-&gt;Edit4-&gt;Text=random(Label1-&gt;Caption.ToInt());<br />
Form3-&gt;Edit7-&gt;Text=random(Label1-&gt;Caption.ToInt());<br />
Form3-&gt;Edit10-&gt;Text=random(Label1-&gt;Caption.ToInt());<br />
Form3-&gt;Edit13-&gt;Text=random(Label1-&gt;Caption.ToInt());<br />
}<br />
else<br />
Form3-&gt;Caption=&quot;NIX&quot;;<br />
}<br />
while ((Form3-&gt;Edit1-&gt;Text.ToInt()+Form3-&gt;Edit4-&gt;Text.ToInt()+Form3-&gt;Edit7-&gt;Text.ToInt()+Form3-&gt;Edit10-&gt;Text.ToInt()+Form3-&gt;Edit13-&gt;Text.ToInt())==(Label1-&gt;Caption.ToInt()));<br />
Form3-&gt;Caption=Form3-&gt;Edit1-&gt;Text.ToInt()+Form3-&gt;Edit4-&gt;Text.ToInt()+Form3-&gt;Edit7-&gt;Text.ToInt()+Form3-&gt;Edit10-&gt;Text.ToInt()+Form3-&gt;Edit13-&gt;Text.ToInt();</p>
<p>nich lachen <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>
]]></description><link>https://www.c-plusplus.net/forum/post/867516</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/867516</guid><dc:creator><![CDATA[TheClash]]></dc:creator><pubDate>Thu, 08 Sep 2005 07:22:37 GMT</pubDate></item><item><title><![CDATA[Reply to random on Thu, 08 Sep 2005 07:30:54 GMT]]></title><description><![CDATA[<p>...und seit ich diese schleife drin habe stürzt mein prog nach einem durchlauf immer ab....ick wes ja ooch nich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/867523</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/867523</guid><dc:creator><![CDATA[TheClash]]></dc:creator><pubDate>Thu, 08 Sep 2005 07:30:54 GMT</pubDate></item><item><title><![CDATA[Reply to random on Thu, 08 Sep 2005 08:19:17 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Fehlermeldung ?<br />
was sagt denn der Debugger dazu</p>
<p>MfG<br />
Klaus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/867555</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/867555</guid><dc:creator><![CDATA[KlausB]]></dc:creator><pubDate>Thu, 08 Sep 2005 08:19:17 GMT</pubDate></item><item><title><![CDATA[Reply to random on Thu, 08 Sep 2005 10:30:35 GMT]]></title><description><![CDATA[<p>kommt keine fehlermeeldung programm läuft und nach dem ich nen button klicke manchmal auch nach mehreren klicks hängt sich das programm auf und ich kann borland neu starten, da es irgend ein &quot;debugger-kernel fehler,fehler 2&quot; anzeigt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/867673</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/867673</guid><dc:creator><![CDATA[TheClash]]></dc:creator><pubDate>Thu, 08 Sep 2005 10:30:35 GMT</pubDate></item><item><title><![CDATA[Reply to random on Thu, 08 Sep 2005 13:28:07 GMT]]></title><description><![CDATA[<p>So unformatiert ist der Code nicht gerade leicht zu interpretieren. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /> Benutze das nächste Mal die Code-Tags, dann gehts einfacher.</p>
<p>Wenn ich das richtig gelesen habe, werden den einzelnen Elementen nur dann über random neue Werte zugewiesen, wenn die Summe aller Werte kleiner als der von Label1 ist, ansonsten passiert &quot;NIX&quot;.</p>
<p>Die Bedingung der while-Schleife, das die Summe gleich sein soll, kann also nicht mehr erfüllt werden, wenn nach dem ersten oder einem weiteren Durchlauf die Summe größer ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/867863</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/867863</guid><dc:creator><![CDATA[Manfred Schmidtke]]></dc:creator><pubDate>Thu, 08 Sep 2005 13:28:07 GMT</pubDate></item></channel></rss>