Ver Mensaje Individual
  #8  
Antiguo 16-08-2007
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Reputación: 24
seoane Va por buen camino
Perdone usted, pero cuando yo pongo un punto es porque es un punto
Código Delphi [-]
program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  i,j,k: Integer;
begin
  Writeln('Introduce la clave:');
  Readln(i);
  j:= i mod 10;
  k:= 0;
  while i > 0 do
  begin
    inc(k,i mod 10);
    i:= i div 10;
  end;
  if k mod 10 = j then
    Writeln('La clave es correcta')
  else
    Writeln('La clave no es correcta');
end.

Responder Con Cita