Курсовая работа: Численные методы Программа-калькулятор на Pascal
b [i]: =a [i] ;
if a [i] >maxa then maxa: =a [i] ;
end;
i: =1;
while (a [i] =0) and (i<=n) do inc (i);
if i=n+1 then writeln ('НОД - любое число')
else begin
for j: =1 to n do if a [j] =0 then a [j]: =a [i] ;
k: =1;
for i: =2 to maxa do
begin
minj: =1000;
for l: =1 to n do
begin
j: =0;
while (a [l] mod i=0) do
begin
a [l]: =a [l] div i;
inc (j);
end;
if (j<minj) then minj: =j;
end;
if (minj<>0) then for l: =1 to minj do k: =k*i;
end;
vecb [k]: =-j;
k: =k+1;
end;
end;
a: =1;