![]() |
|
#1
|
||||
|
||||
![]() Есть такой код:
Код:
a1 := StrToInt(StringReplace(Edit1.Text,',','.',[])); b1 := StrToInt(StringReplace(Edit2.Text,',','.',[])); c1 := StrToInt(StringReplace(Edit3.Text,',','.',[])); d1 := StrToInt(StringReplace(Edit4.Text,',','.',[])); k1 := (a1 + b1 + c1 + d1); //количество оценок if k1<>0 then f1 := (2 * a1 + 3 * b1 + 4 * c1 + 5 * d1)/k1; //расчет str:=FloatToStrF(f1,ffFixed,1,1); if Pos(',',str)<>0 then str[Pos(',',str)]:='.'; label7.Caption:=str; |