<?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[return von long long]]></title><description><![CDATA[<p>Hallo,<br />
ist der return Befehl bei long long Variablen falsch? Wollte die Funktion für größere Zahlen erweitern und hatte daher vorher int anstatt long long.</p>
<pre><code>#include &lt;iostream&gt;

using namespace std;

int potenzieren(long long basis, long long exponent)
{
    long long  ergebnis = 1;
    for (int i=0; i&lt;exponent; i = i+1)
    {
        ergebnis = ergebnis*basis;
    }
    cout &lt;&lt; basis &lt;&lt; &quot; hoch &quot; &lt;&lt; exponent &lt;&lt; &quot; = &quot; &lt;&lt; ergebnis &lt;&lt; &quot;\r&quot;;
    return ergebnis;

}

int main()
{
    cout &lt;&lt; &quot;Programm zum Potenzieren.\r&quot;;
    long long a=0;
    long long b=0;
    cout &lt;&lt; &quot;Basis?:&quot;;
    cin &gt;&gt; a;
    cout &lt;&lt; &quot;Exponent?: &quot;;
    cin &gt;&gt; b;

    potenzieren(a,b);

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/335125/return-von-long-long</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 23:42:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/335125.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 31 Oct 2015 20:53:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to return von long long on Sat, 31 Oct 2015 20:53:19 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ist der return Befehl bei long long Variablen falsch? Wollte die Funktion für größere Zahlen erweitern und hatte daher vorher int anstatt long long.</p>
<pre><code>#include &lt;iostream&gt;

using namespace std;

int potenzieren(long long basis, long long exponent)
{
    long long  ergebnis = 1;
    for (int i=0; i&lt;exponent; i = i+1)
    {
        ergebnis = ergebnis*basis;
    }
    cout &lt;&lt; basis &lt;&lt; &quot; hoch &quot; &lt;&lt; exponent &lt;&lt; &quot; = &quot; &lt;&lt; ergebnis &lt;&lt; &quot;\r&quot;;
    return ergebnis;

}

int main()
{
    cout &lt;&lt; &quot;Programm zum Potenzieren.\r&quot;;
    long long a=0;
    long long b=0;
    cout &lt;&lt; &quot;Basis?:&quot;;
    cin &gt;&gt; a;
    cout &lt;&lt; &quot;Exponent?: &quot;;
    cin &gt;&gt; b;

    potenzieren(a,b);

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2473645</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2473645</guid><dc:creator><![CDATA[LukasLernt]]></dc:creator><pubDate>Sat, 31 Oct 2015 20:53:19 GMT</pubDate></item><item><title><![CDATA[Reply to return von long long on Sat, 31 Oct 2015 21:14:53 GMT]]></title><description><![CDATA[<p>Der Rückgabetyp von potenzieren ist immer noch <code>int</code> .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2473647</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2473647</guid><dc:creator><![CDATA[Furble Wurble]]></dc:creator><pubDate>Sat, 31 Oct 2015 21:14:53 GMT</pubDate></item><item><title><![CDATA[Reply to return von long long on Sat, 31 Oct 2015 21:19:35 GMT]]></title><description><![CDATA[<p>Danke. Hab ich übersehen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2473648</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2473648</guid><dc:creator><![CDATA[LukasLernt]]></dc:creator><pubDate>Sat, 31 Oct 2015 21:19:35 GMT</pubDate></item></channel></rss>