Ver Mensaje Individual
  #10  
Antiguo 02-04-2017
Daniel2622 Daniel2622 is offline
Miembro
NULL
 
Registrado: abr 2017
Posts: 29
Reputación: 0
Daniel2622 Va por buen camino
Hola Casimiri Noveti, este es el código que hice con ayuda de Jhonny:

Código Delphi [-]

implementation

{$R *.lfm}

{ TForm1 }
Procedure cantidad_de_divisores(n:Integer);
var
  vNumero, vI, vCantidad: Integer;
begin
  vCantidad := 0;
  vNumero := StrToInt(Edit1.Text);

  for vI := 1 to vNumero do
    if (vNumero mod vI) = 0 then
      vCantidad := vCantidad + 1;

  Result := vCantidad;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
var
  n:Integer;
  codigo:Integer;
begin
  val(Edit1.Text,n,codigo);
  cantidad_de_divisores(n);
end;
De antemano gracias por tu ayuda.

Última edición por Neftali [Germán.Estévez] fecha: 03-04-2017 a las 12:27:00. Razón: Añadir TAG's
Responder Con Cita