<?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[Erstes selbsgemachtes Tool]]></title><description><![CDATA[<p>Ich hab gerade nen Tool für unseren &quot;Budendienst&quot; geschrieben, das heisst:<br />
Es soll ein Tool sein, das ausrechnet, wer als nächstes die Bude (eine Art Wohnwagen zum Feiern und tun was zu hause verboten is <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="😉"
    /> so nennt man das hier)<br />
aufräumt.<br />
Das Prinzip ist einfach, man gibt an, wieviele da waren und wer es war, und das Tool rechnet eine Prozentzahl aus, wer am meisten Prozent hat muss aufräumen.<br />
z.B. waren am wochenende 7leute da, das heisst jeder bekommt 15%, wären 5 Leute da , bekäme jeder 20% (100/5 = 20) (es wird immer aufgerundet).</p>
<p>(ich weiss das das tool überflüssig ist, es is auch nur zum üben)</p>
<p>Mein Problem:<br />
Egal wie viele Leute ich angebe, das Programm gibt immer 2009050137 an....</p>
<p>Hier ist der Quellcode (&quot;Statistiken hab ich noch nich bearbeitet ;)) :</p>
<pre><code class="language-cpp">#include &lt;cstdlib&gt;
#include &lt;iostream&gt;

using namespace std;

int main(int argc, char *argv[])
{
    int menu;
    int Steffen = 0;
    int Karsten = 0;
    int Marina = 0;
    int Tina = 0;
    int Lena = 0;
    int Niklas = 0;
    int Matthias = 0;
    int Silda = 0;
    int Dennis = 0;
    int Jordy = 0;
    int Frederik = 0;
    int leute;
    int i;
    int x;
    i = 0;
    x = 12;
    int y;

    cout &lt;&lt; &quot;Was möchtest du tun? \n&quot;;
    cout &lt;&lt; &quot;Optionen:\n&quot;;
    cout &lt;&lt; &quot;1.Party eintragen\n&quot;;
    cout &lt;&lt; &quot;2.Statistiken einsehen\n&quot;;

    cin &gt;&gt; menu;

    switch(menu)
              {
                           case 1:
                                cout &lt;&lt; &quot;Wie viele Leute waren da?\n&quot;;
                                cin &gt;&gt; x;
                                cout &lt;&lt; &quot;\n&quot;;
                                cout &lt;&lt; x &lt;&lt; &quot;Leute waren da\n&quot;;
                                cout &lt;&lt; &quot;\nWer war anwesend?\n&quot;;
                                for(i=i; i&lt;x; i=i+1)
                                {
                                    cout &lt;&lt; &quot; 1.  Steffen \n 2.  Karsten \n 3.  Marina \n 4.  Tina \n 5.  Lena \n 6.  Niklas \n 7.  Matthias \n 8.  Silda \n 9.  Dennis \n10.  Jordy \n11.  Frederik \n\n&quot;;
                                    cin &gt;&gt; leute;
                                    switch(leute)
                                                 {
                                                          case 1:
                                                               cout &lt;&lt; &quot;\nSteffen war da\n\n&quot;;
                                                               Steffen = 1;
                                                               break;

                                                          case 2:
                                                               cout &lt;&lt; &quot;\nKarsten war da\n\n&quot;;
                                                               Karsten = 1;
                                                               break;

                                                          case 3:
                                                               cout &lt;&lt; &quot;\nMarina war da\n\n&quot;;
                                                               Marina = 1;
                                                               break;

                                                          case 4: 
                                                               cout &lt;&lt; &quot;\nTina war da\n\n&quot;;
                                                               Tina = 1;
                                                               break;

                                                          case 5:
                                                               cout &lt;&lt; &quot;\nLena war da\n\n&quot;;
                                                               Lena = 1;
                                                               break;

                                                          case 6:
                                                               cout &lt;&lt; &quot;\nNiklas war da\n\n&quot;;
                                                               Niklas = 1;
                                                               break;

                                                          case 7:
                                                               cout &lt;&lt; &quot;\nMatthias war da\n\n&quot;;
                                                               Matthias = 1;
                                                               break;

                                                          case 8:
                                                               cout &lt;&lt; &quot;\nSilda war da\n\n&quot;;
                                                               Silda = 1;
                                                               break;

                                                          case 9:
                                                               cout &lt;&lt; &quot;\nDennis war da\n\n&quot;;
                                                               Dennis = 1;
                                                               break;

                                                          case 10:
                                                               cout &lt;&lt; &quot;\nJordy war da\n\n&quot;;
                                                               Jordy = 1;
                                                               break;

                                                          case 11: 
                                                               cout &lt;&lt; &quot;\nFrederik war da\n\n&quot;;
                                                               Frederik = 1;
                                                               break;

                                                 }

                                         }
         100/x == y;
       cout                                   
      &lt;&lt; &quot;Steffen: &quot; &lt;&lt; y * Steffen &lt;&lt; &quot;\n&quot; 
      &lt;&lt; &quot;Karsten: &quot; &lt;&lt; y * Karsten &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Marina: &quot; &lt;&lt; y * Marina &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Tina: &quot; &lt;&lt; y * Tina &lt;&lt; &quot;\n&quot; 
      &lt;&lt; &quot;Lena: &quot; &lt;&lt; y * Lena &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Niklas: &quot; &lt;&lt; y * Niklas &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Matthias: &quot; &lt;&lt; y * Matthias &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Silda: &quot; &lt;&lt; y * Silda &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Dennis: &quot; &lt;&lt;  y * Dennis &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Jordy: &quot; &lt;&lt; y * Jordy &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Frederik: &quot; &lt;&lt; y * Frederik &lt;&lt; &quot;\n\n\n\n&quot;;                                

                                         break;

                           case 2:
                                cout &lt;&lt; &quot;Hier sind die Statistiken:\n&quot;;
                                break;

              }   

    system(&quot;PAUSE&quot;);
    return EXIT_SUCCESS;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/143437/erstes-selbsgemachtes-tool</link><generator>RSS for Node</generator><lastBuildDate>Wed, 02 Sep 2026 06:48:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/143437.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 08 Apr 2006 14:32:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 14:32:05 GMT]]></title><description><![CDATA[<p>Ich hab gerade nen Tool für unseren &quot;Budendienst&quot; geschrieben, das heisst:<br />
Es soll ein Tool sein, das ausrechnet, wer als nächstes die Bude (eine Art Wohnwagen zum Feiern und tun was zu hause verboten is <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="😉"
    /> so nennt man das hier)<br />
aufräumt.<br />
Das Prinzip ist einfach, man gibt an, wieviele da waren und wer es war, und das Tool rechnet eine Prozentzahl aus, wer am meisten Prozent hat muss aufräumen.<br />
z.B. waren am wochenende 7leute da, das heisst jeder bekommt 15%, wären 5 Leute da , bekäme jeder 20% (100/5 = 20) (es wird immer aufgerundet).</p>
<p>(ich weiss das das tool überflüssig ist, es is auch nur zum üben)</p>
<p>Mein Problem:<br />
Egal wie viele Leute ich angebe, das Programm gibt immer 2009050137 an....</p>
<p>Hier ist der Quellcode (&quot;Statistiken hab ich noch nich bearbeitet ;)) :</p>
<pre><code class="language-cpp">#include &lt;cstdlib&gt;
#include &lt;iostream&gt;

using namespace std;

int main(int argc, char *argv[])
{
    int menu;
    int Steffen = 0;
    int Karsten = 0;
    int Marina = 0;
    int Tina = 0;
    int Lena = 0;
    int Niklas = 0;
    int Matthias = 0;
    int Silda = 0;
    int Dennis = 0;
    int Jordy = 0;
    int Frederik = 0;
    int leute;
    int i;
    int x;
    i = 0;
    x = 12;
    int y;

    cout &lt;&lt; &quot;Was möchtest du tun? \n&quot;;
    cout &lt;&lt; &quot;Optionen:\n&quot;;
    cout &lt;&lt; &quot;1.Party eintragen\n&quot;;
    cout &lt;&lt; &quot;2.Statistiken einsehen\n&quot;;

    cin &gt;&gt; menu;

    switch(menu)
              {
                           case 1:
                                cout &lt;&lt; &quot;Wie viele Leute waren da?\n&quot;;
                                cin &gt;&gt; x;
                                cout &lt;&lt; &quot;\n&quot;;
                                cout &lt;&lt; x &lt;&lt; &quot;Leute waren da\n&quot;;
                                cout &lt;&lt; &quot;\nWer war anwesend?\n&quot;;
                                for(i=i; i&lt;x; i=i+1)
                                {
                                    cout &lt;&lt; &quot; 1.  Steffen \n 2.  Karsten \n 3.  Marina \n 4.  Tina \n 5.  Lena \n 6.  Niklas \n 7.  Matthias \n 8.  Silda \n 9.  Dennis \n10.  Jordy \n11.  Frederik \n\n&quot;;
                                    cin &gt;&gt; leute;
                                    switch(leute)
                                                 {
                                                          case 1:
                                                               cout &lt;&lt; &quot;\nSteffen war da\n\n&quot;;
                                                               Steffen = 1;
                                                               break;

                                                          case 2:
                                                               cout &lt;&lt; &quot;\nKarsten war da\n\n&quot;;
                                                               Karsten = 1;
                                                               break;

                                                          case 3:
                                                               cout &lt;&lt; &quot;\nMarina war da\n\n&quot;;
                                                               Marina = 1;
                                                               break;

                                                          case 4: 
                                                               cout &lt;&lt; &quot;\nTina war da\n\n&quot;;
                                                               Tina = 1;
                                                               break;

                                                          case 5:
                                                               cout &lt;&lt; &quot;\nLena war da\n\n&quot;;
                                                               Lena = 1;
                                                               break;

                                                          case 6:
                                                               cout &lt;&lt; &quot;\nNiklas war da\n\n&quot;;
                                                               Niklas = 1;
                                                               break;

                                                          case 7:
                                                               cout &lt;&lt; &quot;\nMatthias war da\n\n&quot;;
                                                               Matthias = 1;
                                                               break;

                                                          case 8:
                                                               cout &lt;&lt; &quot;\nSilda war da\n\n&quot;;
                                                               Silda = 1;
                                                               break;

                                                          case 9:
                                                               cout &lt;&lt; &quot;\nDennis war da\n\n&quot;;
                                                               Dennis = 1;
                                                               break;

                                                          case 10:
                                                               cout &lt;&lt; &quot;\nJordy war da\n\n&quot;;
                                                               Jordy = 1;
                                                               break;

                                                          case 11: 
                                                               cout &lt;&lt; &quot;\nFrederik war da\n\n&quot;;
                                                               Frederik = 1;
                                                               break;

                                                 }

                                         }
         100/x == y;
       cout                                   
      &lt;&lt; &quot;Steffen: &quot; &lt;&lt; y * Steffen &lt;&lt; &quot;\n&quot; 
      &lt;&lt; &quot;Karsten: &quot; &lt;&lt; y * Karsten &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Marina: &quot; &lt;&lt; y * Marina &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Tina: &quot; &lt;&lt; y * Tina &lt;&lt; &quot;\n&quot; 
      &lt;&lt; &quot;Lena: &quot; &lt;&lt; y * Lena &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Niklas: &quot; &lt;&lt; y * Niklas &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Matthias: &quot; &lt;&lt; y * Matthias &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Silda: &quot; &lt;&lt; y * Silda &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Dennis: &quot; &lt;&lt;  y * Dennis &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Jordy: &quot; &lt;&lt; y * Jordy &lt;&lt; &quot;\n&quot;  
      &lt;&lt; &quot;Frederik: &quot; &lt;&lt; y * Frederik &lt;&lt; &quot;\n\n\n\n&quot;;                                

                                         break;

                           case 2:
                                cout &lt;&lt; &quot;Hier sind die Statistiken:\n&quot;;
                                break;

              }   

    system(&quot;PAUSE&quot;);
    return EXIT_SUCCESS;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1033270</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033270</guid><dc:creator><![CDATA[CronX]]></dc:creator><pubDate>Sat, 08 Apr 2006 14:32:05 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 14:49:39 GMT]]></title><description><![CDATA[<p>Gute Signatur! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
<p>Du willst uns Informatikern doch nicht erzählen, dass du so viele Leute kennst die mit dir auf ne Party gehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1033277</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033277</guid><dc:creator><![CDATA[TheGreatGameCooler]]></dc:creator><pubDate>Sat, 08 Apr 2006 14:49:39 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 14:58:52 GMT]]></title><description><![CDATA[<p>heut abend is geburtstag da sind bestimmt 20 <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>ich glaub die nehmen mich auch nur, weil ich die HP geschrieben hab <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>wie iher sicher gemerkt habt, bin ich eh noch ncih so gut <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="😛"
    /> das kommt wohl mit der zeit^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1033290</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033290</guid><dc:creator><![CDATA[CronX]]></dc:creator><pubDate>Sat, 08 Apr 2006 14:58:52 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 15:03:42 GMT]]></title><description><![CDATA[<p>Durch die Verwendung von Arrays kann man viel tipparbeit sparen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1033295</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033295</guid><dc:creator><![CDATA[Tipp:]]></dc:creator><pubDate>Sat, 08 Apr 2006 15:03:42 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 15:23:24 GMT]]></title><description><![CDATA[<p>Hi,<br />
Der Fehler in deinem programm ist da:<br />
100/x == y;<br />
das muss<br />
y = 100.0f / x;<br />
heißen.</p>
<p>Tschau,<br />
Cappo</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1033301</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033301</guid><dc:creator><![CDATA[Cappo]]></dc:creator><pubDate>Sat, 08 Apr 2006 15:23:24 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 15:44:47 GMT]]></title><description><![CDATA[<p>herzlichen dank,<br />
kann mir vielleicht noch jemand sagen, wie ich das prog dazu bringe, die zahl automatisch aufzurunden?</p>
<p>btw. was heisst bzw. bewirkt das f?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1033314</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033314</guid><dc:creator><![CDATA[CronX]]></dc:creator><pubDate>Sat, 08 Apr 2006 15:44:47 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 16:07:48 GMT]]></title><description><![CDATA[<p>Hi,<br />
Das f bedeutet, dass es eine Float Zahl ist.<br />
Um automatisch aufzurunden:<br />
y = (100.0f / x) + 0.5f;</p>
<p>Tschau,<br />
Cappo</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1033340</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033340</guid><dc:creator><![CDATA[Cappo]]></dc:creator><pubDate>Sat, 08 Apr 2006 16:07:48 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 16:14:47 GMT]]></title><description><![CDATA[<p>thx nochmal</p>
<p>damit das progi auch noch einen zweck erfüllt würd ich wohl wollen, dass er sich die daten merkt und die zahlen addiert, so das man den gesamtwert einer person über &quot;statistiken&quot; aufrufn kann.... is das schwer?</p>
<p>ebenfalls wärs ganz net, wenn îch nach dem eingeben einer zahl nicht immer enter drücken müsste</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1033345</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033345</guid><dc:creator><![CDATA[CronX]]></dc:creator><pubDate>Sat, 08 Apr 2006 16:14:47 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 17:35:48 GMT]]></title><description><![CDATA[<p>CronX schrieb:</p>
<blockquote>
<p>damit das progi auch noch einen zweck erfüllt würd ich wohl wollen, dass er sich die daten merkt und die zahlen addiert, so das man den gesamtwert einer person über &quot;statistiken&quot; aufrufn kann.... is das schwer?</p>
</blockquote>
<p>Nein.</p>
<blockquote>
<p>ebenfalls wärs ganz net, wenn îch nach dem eingeben einer zahl nicht immer enter drücken müsste</p>
</blockquote>
<p>Stimmt.</p>
<p>Falls du Antowrten erwartest: <a href="http://www.catb.org/~esr/faqs/smart-questions.html" rel="nofollow">http://www.catb.org/~esr/faqs/smart-questions.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1033375</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033375</guid><dc:creator><![CDATA[...]]></dc:creator><pubDate>Sat, 08 Apr 2006 17:35:48 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 17:41:29 GMT]]></title><description><![CDATA[<p>Das Programm soll sich die Werte merken?<br />
Fein, dann lass deinen Computer einfach 365 Tage im Jahr an,<br />
wenn dir die Stromrechnung doch etwas zu teuer wird...</p>
<p>Such mal nach #include &lt;fstream&gt; mit Google.</p>
<p>Enter drücken... Warum kann cin wohl mehrere Argumente bearbeiten?<br />
Denk doch ein wenig mit.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1033379</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033379</guid><dc:creator><![CDATA[add_your_service]]></dc:creator><pubDate>Sat, 08 Apr 2006 17:41:29 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sat, 08 Apr 2006 19:15:51 GMT]]></title><description><![CDATA[<p>seid nett zu ihm erklärt ihm alles in schritten...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1033447</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033447</guid><dc:creator><![CDATA[dddddddd]]></dc:creator><pubDate>Sat, 08 Apr 2006 19:15:51 GMT</pubDate></item><item><title><![CDATA[Reply to Erstes selbsgemachtes Tool on Sun, 09 Apr 2006 16:44:20 GMT]]></title><description><![CDATA[<p>thx, aber die eine seite is nix für mich, ich kann zwar englisch, aber da sind zu viele fachbegriffe <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>und bevor ich prof. englisch lerne (was ja eh mit der zeit kommt) find cih wohl ne andere seite (nich bös sein <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/1033966</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1033966</guid><dc:creator><![CDATA[CronX]]></dc:creator><pubDate>Sun, 09 Apr 2006 16:44:20 GMT</pubDate></item></channel></rss>