Hello I have problem my bmi index is kinda broken i dont know why
And i dont really understant this command
RadioGroup1.Caption:='BMI = '+floattostr(bmi);
procedure TForm1.Button1Click(Sender: TObject);
var heightm,weightkg,bmi:real;
begin
heightm:=StrToFloat(edit1.text);
weightkg:=StrToFloat(edit2.text);
bmi:=weightkg/heightm;
RadioGroup1.Caption:='BMI = '+floattostr(bmi);
if bmi<=19.9 then RadioGroup1.ItemIndex:=0;
if bmi<=24.9 then RadioGroup1.ItemIndex:=1;
if bmi<=29.9 then RadioGroup1.ItemIndex:=2;
if bmi<=39.9 then RadioGroup1.ItemIndex:=3;
if bmi >40 then RadioGroup1.ItemIndex:=4;
Thanks for all answers