Facebook
From Gamboge Finch, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 179
  1.  
  2.  
  3. #include "pch.h"
  4. #include <iostream>
  5. #include <cstdlib>
  6. #include <ctime>
  7. #define M 10
  8. #define N 4
  9. using namespace std;
  10. int main()
  11. {
  12.         int i, j;
  13.         int w = 3;
  14.         int     k = 4;
  15.         int tab[M][N];
  16.         int a = 0;
  17.        
  18.         //dodaje ślimakiem
  19.         /*for (i = 1; i < M ; i++)
  20.         {
  21.                 if ((i % 2)==1)
  22.                 {
  23.                         for (j = 1; j < N + 1; j++)
  24.                         {
  25.                                 tab[i][j] = a;
  26.                                 a++;
  27.                         }
  28.                 }
  29.                 else
  30.                 {
  31.                         for (j= N; j > 0; j--)
  32.                         {
  33.                                 tab[i][j] = a;
  34.                                 a++;
  35.                         }
  36.                 }
  37.                
  38.         }
  39.  
  40.         for (  i = 1; i < M; i++)
  41.         {
  42.                 for ( j = 1; j < N + 1; j++)
  43.                 {
  44.                         cout << tab[i][j] << "\t";
  45.                 }
  46.                 cout << endl;
  47.         }
  48.         */
  49.  
  50.  
  51.  
  52.         system("PAUSE");
  53.         return 0;
  54. }
  55.  
  56.