02-09-2012, 06:53 PM
السلام عليكم ...استخدم الدالة round
round(1.99) donne 2
round(1.5) donne 2
round(1.499) donne 1
round(1.99) donne 2
round(1.5) donne 2
round(1.499) donne 1
PHP كود :
procedure TForm1.Button1Click(Sender: TObject);
var
a:real;
begin
a:=strtofloat(edit1.Text);
edit1.Text:=inttostr(round(strtofloat(edit1.Text)));
end;

