Ирина
Ирина

Помогите найти ошибку, надо найти опредитель по методу треугольника

procedure opred;
var i,j,n,v:Integer;
q,w,e,r,t,o,m, re:real;
te,u:integer;
begin
form2.edit2.text:=inttostr(form3.ComboBox1.ItemIndex+1);
v:=strtoint(form2.edit2.text);
form2.StringGrid6.ColCount:=v+1;
form2.StringGrid6.rowcount:=v+1;

begin

if (v-1)=2 then begin
m:=strtofloat(form2.StringGrid6.cells[1,1])*strtofloat(form2.StringGrid6.cells[2,2]);
r:=strtofloat(form2.StringGrid6.cells[2,1])*strtofloat(form2.StringGrid6.cells[1,2]);
o:= m-r;
form2.edit1.Text:=floatToStr(o);
end; end;

if (v)>3 then begin
u:=(v-3);
v:=strtoint(form2.edit2.text);
form2.StringGrid19.ColCount:=3;
form2.StringGrid19.rowCount:=3;

for i:=1 to v do begin
for j:=1 to v do begin
form2.StringGrid19.cells[j,i]:=form2.StringGrid6.cells[j+u,i+u];
end;
end;

m:=strtofloat(form2.StringGrid19.cells[1,1])*strtofloat(form2.StringGrid19.cells[2,2])*+strtofloat(form2.StringGrid19.cells[3,3]);
q:=strtofloat(form2.StringGrid19.cells[1,2])*strtofloat(form2.StringGrid19.cells[2,3])*strtofloat(form2.StringGrid19.cells[3,1]);

w:=strtofloat(form2.StringGrid19.cells[2,1])*strtofloat(form2.StringGrid19.cells[3,2])*strtofloat(form2.StringGrid19.cells[1,3]);

e:=strtofloat(form2.StringGrid19.cells[3,1])*strtofloat(form2.StringGrid19.cells[2,2])*strtofloat(form2.StringGrid19.cells[1,3]);
r:=strtofloat(form2.StringGrid19.cells[2,1])*strtofloat(form2.StringGrid19.cells[1,2])*strtofloat(form2.StringGrid19.cells[3,3]);
t:=strtofloat(form2.StringGrid19.cells[3,2])*strtofloat(form2.StringGrid19.cells[2,3])*strtofloat(form2.StringGrid19.cells[1,1]);

if (v-1)>3 then begin
re:=1;
te:=v-3;
for i:=1 to te do begin
for j:=1 to te do begin
if j=i then
re:=re*strtofloat(form2.StringGrid6.cells[j,i]);
end;end;
end;

o:= ((m+q+w)-(e+r+t))*re;
form2.edit1.Text:=floatToStr(o);
end;

if (v-1)=3 then begin
m:=strtofloat(form2.StringGrid6.cells[1,1])*strtofloat(form2.StringGrid6.cells[2,2])*strtofloat(form2.StringGrid6.cells[3,3]);

q:=strtofloat(form2.StringGrid6.cells[1,2])*strtofloat(form2.StringGrid6.cells[2,3])*strtofloat(form2.StringGrid6.cells[3,2]);

w:=strtofloat(form2.StringGrid6.cells[2,1])*strtofloat(form2.StringGrid6.cells[3,2])*strtofloat(form2.StringGrid6.cells[1,3]);

e:=strtofloat(form2.StringGrid6.cells[3,1])*strtofloat(form2.StringGrid6.cells[2,2])*strtofloat(form2.StringGrid6.cells[1,3]);
r:=strtofloat(form2.StringGrid6.cells[2,1])*strtofloat(form2.StringGrid6.cells[1,2])*strtofloat(form2.StringGrid6.cells[3,3]);
t:=strtofloat(form2.StringGrid6.cells[3,2])*strtofloat(form2.StringGrid6.cells[2,3])*strtofloat(form2.StringGrid6.cells[1,1]);

o:= (m+q+w)-(e+r+t);
form2.edit1.Text:=floatToStr(o);

end;
end;

DL
Djanuska Lapuska

Ты рехнулся

РЯ
Роман Яковлев

Йоп тя нафиг... Сначала скажи, что за язык программирование, что-нибудь да и вспомню...

НС
Надежда Сим

Я бы за такое ставил 2 не задумываясь.
Сначала копируем данные из формы в переменные, затем работаем с переменными и потом возвращаем в форму. А копаться в этом нагромождении из двух десятков strtofloat(form2.StringGrid, перемежаемых однобуквенными переменными, означающими неизвестно что - извини, ищи другого ассенизатора.
Тем более что ты не написал, почему решил, что тут есть ошибка.

СК
Слава Калошин

Это потому что ты ищешь "опредитель". Вот и получается такой говенный код.

Похожие вопросы
Помогите найти ошибку в PHP
Помогите найти ошибку pascal
Помогите найти ошибку) _)))
Помогите найти ошибку))))
помогите найти ошибку!!! на с++
Помогите найти ошибку)
Помогите найти ошибку. Паскаль. Ошибка в ситаксисе
Помогите найти ошибку в коде Метод JSON. ajax
ПОМОГИТЕ НАЙТИ ОШИБКУ!
помогите найти ошибку