#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#define N 5        // radky
#define M 10       // sloupce

int main(void) {
  int mat[N][M];	// matice 5x10
  int r, s; 
  int i = 10, j = 20;
  int test[i][j];
  srand(time(NULL));
  
  for (r = 0; r < N; r++) { // postupne prochazeni radku
    for (s = 0; s < M; s++) { // postupne prochazeni sloupcu
      mat[r][s]= rand() % 20 + 1; // nahodne cislo od 1 do 20 
    } 
  }
  
  for (r = 0; r < N; r++) {
    for (s = 0; s < M; s++) {
      printf("%d ", mat[r][s]);
    }
    printf("\n"); 
  }
  printf("exit \n");
  getchar();
}