TryStrToInt(Edit1.Text, i); if i>30 then Edit1.Text:='30';
case i of 0..10: Label2.Caption:='1'; 11..20: Label2.Caption:='2'; else Label2.Caption:='3'; end;