Jo jo jo, ahora ya hacemos hasta tareas
Código Delphi
[-]
var
i, Acumulado :Integer;
UltimoDigito :String;
begin
Acumulado := 0;
UltimoDigito := Edit1.Text[Length(Edit1.Text)];
for i := 1 to Length(Edit1.Text)-1 do
begin
Acumulado := Acumulado + StrToInt(Edit1.Text[i]);
end;
if IntToStr(Acumulado)[Length(IntToStr(Acumulado))] = UltimoDigito then
ShowMessage('Correcto')
else
ShowMessage('InCorrecto');
end;