Algorithm Math Delphi

Title: Get last digit of integer number
Use GetLastDigit function.
function GetLastDigit(Num: Integer): string;
begin
Result:=FloatToStr(Num mod 10);
end;