• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Basic Matrix Pascal

SuperEPF Aug 14th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. program Matrice;
2. const
3. MAX = 100;
4.
5. type matrica = array [1..MAX,1..MAX] of integer;
6.
7. var
8. n,m: integer;
9. a:matrica;
10.
11. procedure readmatrix(n:integer; m:integer; var a:matrica);
12. var
13. i,j:integer;
14.
15. begin
16. for i:=1 to n do
17.     for j:=1 to m do
19.
20. end;
21. procedure printmatrix(n,m:integer; a:matrica);
22. var
23. i,j:integer;
24.
25. begin
26. for i:=1 to n do
27. begin
28.     for j:=1 to m do
29.         write(a[i,j],' ');
30.         writeln(' ');
31. end;
32. end;
33.
34. procedure transpon(var n,m:integer;var a:matrica);
35. var
36. i,j,t:integer;
37. o:matrica;
38.
39. begin
40. for i:=1 to n do
41.
42.     for j:=1 to m do
43.         o[j,i]:=a[i,j];
44.      t:=m;
45.      m:=n;
46.      n:=t;
47.
48.    a:=o;
49.
50.
51.
52. end;
53.
54. begin
55. writeln('Uneti broj vrsta i kolona matrice: ' );