GamerSK

Matice

Apr 24th, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.56 KB | None | 0 0
  1. //Napiste program ktory vygeneruje maticu obsahujucu cele cisla.
  2. //Matica ma R riadkov a S stlpcov
  3. program matica;
  4. {$APPTYPE CONSOLE}
  5. uses SysUtils;
  6. var c:array[1..255,1..255] of byte;
  7.     i,j,r,s:byte;
  8. begin
  9.   { TODO -oUser -cConsole Main : Insert code here }
  10.   write('Zadajte pocet riadkov: ');
  11.   readln(r);
  12.   write('Zadajte pocet stlpcov: ');
  13.   readln(s);
  14.   randomize;
  15.   for i:=1 to r do
  16.     begin
  17.       for j:=1 to s do
  18.         begin
  19.           c[i,j]:=random(100);
  20.           write(c[i,j]:5);
  21.         end;
  22.       writeln;
  23.     end;
  24.   readln;
  25. end.
Advertisement
Add Comment
Please, Sign In to add comment