Czy da sie w Pascalu da sie odnosic w funkcjach do konkretnego sąsiedztwa w tablicach ?
chodzi mi np w tym programie
Program ...
function wnetrze(x:boolen)
var tab: array(1...6,1...6) of integer
l,f,i,j,z: integer
begin
z:=0;
for i:=1 to 6 do
for j:=1 to 6 do
if tab[i,j,l,f] mod 6=0 then
z:=z+1;
if z>5 then
x:=true;
end.
function zewnatrz(x:boolen)
var tab: array[1...6,1...6,1...3,1...3] of integer
i,j,l,f,z, : integer;
begin
z:=0;
for l:=1 to 3 do
for f:=1 to 3 do
if wnetrze(tab[i,j,l,f]) = true then
z:=z+1;
if wnetrze(tab[j,k,z,z])= true then
z:=z-1;
if z>5 then x:= true;
var tab: array[1...6,1...6,1...n,1...n] of integer
l,f,i,j,z : integer;
begin
z:=0;
for l:=2 to n-1 do
for f:=2 to n-1 do
if zewnatrz(tab[i,j,k,l])= true then
z:=z+1;
writeln(z);
end.
jezeli ktos nie wie co ma dany program robic to :
program ktory sprwadza czy w sasiedztwie jakiejs tablicy jest 6 tablic w ktorych jest co najmniej 6 liczbpodzielnych przez 6
czy da sie jakos ominac ten problem?
