a) program a_1;
var a:array[1..10,1..10] of integer;
n, m, i, j:integer;
begin
write('n='); readln(n);
write('m='); readln(m);
for i:=1 to n do
for j:=1 to m do
begin
write('a[',i, ' , ',j, '] =');
readln(a[i, j]);
end;
for i:=1 to n do
for j:=1 to m do
If( a[i,j] >=0) then
write( a[i,j],'_');
readln
end.
b) Exact ca la punctul a) doar cu o mica modificare:
In loc de If( a[i,j] >=0) then vei pune urmatoarea conditie:
s:=0;
if( a[i,j]<100) then
s:= s+ a[i,j];
write('Suma=',s);
readln
end.
Bafta!