Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program egz;
- {$APPTYPE CONSOLE}
- uses
- SysUtils;
- type
- tab = array of array of integer;
- function licz (n:integer; var t: tab; y:integer):real;
- var j:integer;
- k:real;
- begin
- k:=0;
- for j:=0 to y-1 do
- begin
- k:=k+t[n-1,j];
- writeln(k);
- end;
- licz:=k;
- end;
- var t:tab;
- x,y,n,i,j:integer;
- begin
- writeln('ile wierszy');
- readln(x);
- writeln('ile kolumn');
- readln(y);
- setlength(t,x,y);
- writeln('wczytaj tablice');
- for i:=0 to x-1 do
- begin
- for j:=0 to y-1 do
- begin
- readln(t[i,j]);
- end;
- end;
- writeln('podaj nr wiersza:');
- readln(n);
- writeln('suma elementow:');
- writeln(licz(n,t,y));
- readln;
- end.
Add Comment
Please, Sign In to add comment