<?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[20*2 matrix erstellen]]></title><description><![CDATA[<p>wie erstelle ich am besten eine 20*2 Matrix<br />
Habe das hier mal versucht !!<br />
Ist mir allerdings nicht richtig gelungen ´(unter andrem wegen dem Speicherplatz)</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

void main( )
{
  unsigned long matrix [2] [20];
  for (int i = 0; i &lt; 2; i++)

 {
    for (int j = 0; j &lt; 20; j++)
    {
      cout &lt;&lt; &quot;Geben sie das Matrixelement a&quot; &lt;&lt; i+1 &lt;&lt; j+1 &lt;&lt;&quot; ein: &quot;;
      cin &gt;&gt; matrix [i] [j];
    }
  }
  cout &lt;&lt; &quot;Die eingegebene Matrix lautet: &quot; &lt;&lt; endl;
  for (int i = 0; i &lt; 20; i++)
  {
    for (int j = 0; j &lt; 2; j++)
    cout &lt;&lt; matrix [i] [j] &lt;&lt; &quot; &quot;;
    cout &lt;&lt; endl;
	system (&quot;pause&quot;);
  }
}
</code></pre>
<p>gruß joeer</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/203211/20-2-matrix-erstellen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 07 Oct 2026 11:58:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/203211.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 20 Jan 2008 11:56:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 20*2 matrix erstellen on Sun, 20 Jan 2008 11:56:47 GMT]]></title><description><![CDATA[<p>wie erstelle ich am besten eine 20*2 Matrix<br />
Habe das hier mal versucht !!<br />
Ist mir allerdings nicht richtig gelungen ´(unter andrem wegen dem Speicherplatz)</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

void main( )
{
  unsigned long matrix [2] [20];
  for (int i = 0; i &lt; 2; i++)

 {
    for (int j = 0; j &lt; 20; j++)
    {
      cout &lt;&lt; &quot;Geben sie das Matrixelement a&quot; &lt;&lt; i+1 &lt;&lt; j+1 &lt;&lt;&quot; ein: &quot;;
      cin &gt;&gt; matrix [i] [j];
    }
  }
  cout &lt;&lt; &quot;Die eingegebene Matrix lautet: &quot; &lt;&lt; endl;
  for (int i = 0; i &lt; 20; i++)
  {
    for (int j = 0; j &lt; 2; j++)
    cout &lt;&lt; matrix [i] [j] &lt;&lt; &quot; &quot;;
    cout &lt;&lt; endl;
	system (&quot;pause&quot;);
  }
}
</code></pre>
<p>gruß joeer</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1439836</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1439836</guid><dc:creator><![CDATA[Jooer]]></dc:creator><pubDate>Sun, 20 Jan 2008 11:56:47 GMT</pubDate></item><item><title><![CDATA[Reply to 20*2 matrix erstellen on Sun, 20 Jan 2008 12:11:32 GMT]]></title><description><![CDATA[<p>ich glaube ich hab dein problem gelöst <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>
<pre><code class="language-cpp">#include &lt;iostream&gt;
using namespace std;

int main( )
{
  unsigned long matrix [2] [20];
  srand(unsigned(time(NULL)));
  for (int i = 0; i &lt; 2; i++)

 {
    for (int j = 0; j &lt; 20; j++)
    {
      /*cout &lt;&lt; &quot;Geben sie das Matrixelement a &quot; &lt;&lt; i+1 &lt;&lt;&quot; / &quot;&lt;&lt; j+1 &lt;&lt;&quot; ein: &quot;;
      cin &gt;&gt; matrix [i] [j];*/
      matrix[i] [j] = rand()%20+1;
    }
  }
  cout &lt;&lt; &quot;Die eingegebene Matrix lautet: &quot; &lt;&lt; endl;
  for (int i = 0; i &lt; 2; i++) //bei deinem code stand hier 20, hier muss aber 2 hin
  {
    for (int j = 0; j &lt; 20; j++) // und hier muss die 20 hin, du hattest nur einen dreher drinne,
    {
    cout &lt;&lt; matrix [i] [j] &lt;&lt; &quot; &quot;;

    }
        cout &lt;&lt; endl;

  }
}

// ich habe mal zufallszahlen reinschreiben lassen damit man sich die langen eingaben spart.
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1439843</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1439843</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Sun, 20 Jan 2008 12:11:32 GMT</pubDate></item><item><title><![CDATA[Reply to 20*2 matrix erstellen on Sun, 20 Jan 2008 12:11:45 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>In der Ausgabe-Schleife zählst du i bis 20, und j nur bis 2.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1439844</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1439844</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sun, 20 Jan 2008 12:11:45 GMT</pubDate></item><item><title><![CDATA[Reply to 20*2 matrix erstellen on Sun, 20 Jan 2008 12:26:25 GMT]]></title><description><![CDATA[<p>Dann erhalte ich doch eine 2*20 Matrix und keine 20*2 Matrix!!<br />
Oder stehe ich gerade totall auf dem Schlauch???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1439852</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1439852</guid><dc:creator><![CDATA[joeer]]></dc:creator><pubDate>Sun, 20 Jan 2008 12:26:25 GMT</pubDate></item><item><title><![CDATA[Reply to 20*2 matrix erstellen on Sun, 20 Jan 2008 12:30:22 GMT]]></title><description><![CDATA[<p>naja das was du gepostet hast am anfang is aber shcon eine 2*20 matrix, du müsstest es umdrehen wennde eine 20*2 matrix haben willst <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1439853</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1439853</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Sun, 20 Jan 2008 12:30:22 GMT</pubDate></item><item><title><![CDATA[Reply to 20*2 matrix erstellen on Sun, 20 Jan 2008 13:34:02 GMT]]></title><description><![CDATA[<p>sorry für den dp</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1439893</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1439893</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Sun, 20 Jan 2008 13:34:02 GMT</pubDate></item></channel></rss>