<?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[Erste Erfahrungen mit C++]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich möchte ein kleines einfaches Programm schreiben, vielleicht könnt ihr mir da etwas helfen, da ich gerade erste Erfahrungen mit C++ und Programmierung sammle.<br />
Das ganze soll folgendes leisten:<br />
* A=a*M^b<br />
* A ist das Lebensalter, M die Körpermasse von Hunden<br />
* a und b ist zu berechnen!</p>
<p>Okay, soweit so gut, ich habe jetzt auch schon ein Grobgerüst gebaut:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;cmath&gt;

using namespace std;

int main(){
  double A = 0; //Lebensalter
  double M = 0; //Koerpermasse
  double a = 0; //auszurechnen
  double b = 0; //auszurechnen

  cout &lt;&lt; &quot;Bitte einen Wert fuer M eingeben: &quot; &lt;&lt; endl;
  cin &gt;&gt; M;
  cout &lt;&lt; &quot;Bitte einen Wert fuer A eingeben: &quot; &lt;&lt; endl;
  cin &gt;&gt; A;

}
</code></pre>
<p>Allerdings habe ich jetzt keine Ahnung was ich machen muss um mir a und b ausrechnen zu lassen. Bitt ehelft mir <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/165879/erste-erfahrungen-mit-c</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 02:28:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/165879.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Nov 2006 19:46:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Erste Erfahrungen mit C++ on Thu, 23 Nov 2006 19:46:14 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich möchte ein kleines einfaches Programm schreiben, vielleicht könnt ihr mir da etwas helfen, da ich gerade erste Erfahrungen mit C++ und Programmierung sammle.<br />
Das ganze soll folgendes leisten:<br />
* A=a*M^b<br />
* A ist das Lebensalter, M die Körpermasse von Hunden<br />
* a und b ist zu berechnen!</p>
<p>Okay, soweit so gut, ich habe jetzt auch schon ein Grobgerüst gebaut:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;cmath&gt;

using namespace std;

int main(){
  double A = 0; //Lebensalter
  double M = 0; //Koerpermasse
  double a = 0; //auszurechnen
  double b = 0; //auszurechnen

  cout &lt;&lt; &quot;Bitte einen Wert fuer M eingeben: &quot; &lt;&lt; endl;
  cin &gt;&gt; M;
  cout &lt;&lt; &quot;Bitte einen Wert fuer A eingeben: &quot; &lt;&lt; endl;
  cin &gt;&gt; A;

}
</code></pre>
<p>Allerdings habe ich jetzt keine Ahnung was ich machen muss um mir a und b ausrechnen zu lassen. Bitt ehelft mir <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1180309</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1180309</guid><dc:creator><![CDATA[GagaMensch]]></dc:creator><pubDate>Thu, 23 Nov 2006 19:46:14 GMT</pubDate></item><item><title><![CDATA[Reply to Erste Erfahrungen mit C++ on Thu, 23 Nov 2006 19:49:09 GMT]]></title><description><![CDATA[<p>Du kannst keine zwei Variablenwerte mit nur einer Gleichung bestimmen, höchsten ihr Verhältnis.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1180314</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1180314</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Thu, 23 Nov 2006 19:49:09 GMT</pubDate></item><item><title><![CDATA[Reply to Erste Erfahrungen mit C++ on Thu, 23 Nov 2006 19:56:52 GMT]]></title><description><![CDATA[<p>wie willst du mit einer Gleichung 2 Werte bestimmen, die eine unbekannte wird ja immer auch von der anderen beeinflusst</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1180318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1180318</guid><dc:creator><![CDATA[Checker*amp*Murckser]]></dc:creator><pubDate>Thu, 23 Nov 2006 19:56:52 GMT</pubDate></item><item><title><![CDATA[Reply to Erste Erfahrungen mit C++ on Fri, 24 Nov 2006 07:49:15 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>vielleicht ist auch gemeint, dass das Programm sowohl a zu vorgegebenem b als auch b zu vorgegebenem a berechnen kann....</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/14486">@GagaMensch</a>: Du bist ja schon auf dem richtigen Weg. Was jetzt noch fehlt:</p>
<ul>
<li>Formel so umstellen, dass einmal &quot;a= ....&quot; und einmal &quot;b=...&quot; stehen bleibt (&quot;Äquivalenzumformungen&quot;)</li>
<li>Einlesen von a oder b (so wie Du schon M und A einliest); ggf. auch Einlesen der Auswahl (&quot;soll a oder b eingegeben werden ?&quot;)</li>
<li>Formel &quot;eintippen&quot;</li>
<li>Ergebnis ausgeben</li>
</ul>
<p>Eine andere Möglichkeit wäre, dass Du eine Tabelle ausgeben sollst. Dann musst Du in einer Schleife einen Wert (z.B. a) hochzählen, den anderen (z.B. b) berechnen und beide ausgeben ...</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1180479</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1180479</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Fri, 24 Nov 2006 07:49:15 GMT</pubDate></item><item><title><![CDATA[Reply to Erste Erfahrungen mit C++ on Fri, 24 Nov 2006 10:38:20 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Das sieht mir eher danach aus, dass er zu einer gegebenen Menge an Wertepaaren M,A die Paramter der angepassten Funktion a,b bestimmen will. Stichwort dazu wäre<br />
<a href="http://de.wikipedia.org/wiki/Methode_der_kleinsten_Quadrate" rel="nofollow">Methode der kleinste Quadrate</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1180586</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1180586</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Fri, 24 Nov 2006 10:38:20 GMT</pubDate></item></channel></rss>