Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 10-06-2010
Ruben_21 Ruben_21 is offline
Miembro
 
Registrado: dic 2007
Posts: 17
Poder: 0
Ruben_21 Va por buen camino
Hola a todos que tal... aca posteo la solucion. Por si a alguien le sirve. Gracias a todos por las respuestas.

Saludos.
Código Delphi [-]procedure TForm1.Button4Click(Sender: TObject); var Ind1:Integer; Ind2:Integer; Cuenta:Integer; Aux:Integer; Cuenta2: Integer; begin CantidadParticipantes:=strtoint(Edit1.Text); CantidadParticipantes:=CantidadParticipantes+1; Form2.Memo1.Clear; SetLength(Participantes,CantidadParticipantes+2); for Cuenta:=1 to CantidadParticipantes do Participantes[Cuenta]:=Cuenta; Randomize; for Cuenta:=1 to (CantidadParticipantes+2)*3 do begin Ind1:=Random(CantidadParticipantes); if Ind1 = 0 then Ind1:=Ind1+1; Ind2:=Random(CantidadParticipantes); if Ind2 = 0 then Ind2:=Ind2+1; Aux:=Participantes[Ind1]; Participantes[Ind1]:= Participantes[Ind2]; Participantes[Ind2]:= Aux; end; for Cuenta2:=1 to CantidadParticipantes-1 do Form2.Memo1.Lines.Add(inttostr(Cuenta2)+'º Lugar Participante Nro: ' + inttostr(Participantes[Cuenta2])); Form2.ShowModal; Button4.Enabled:=False; Edit1.ReadOnly:=True; end;
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
numeros aleatorios no repetitivos d-hugo OOP 6 13-01-2008 14:35:18
Generación de Números Aleatorios DarkDrakon Varios 8 10-10-2006 16:33:06
Función números aleatorios Sarola Oracle 6 17-11-2005 21:26:02
Generador de números aleatorios gontxalo OOP 16 09-06-2005 21:38:07
numeros aleatorios emeritos Varios 1 24-11-2003 14:09:43


La franja horaria es GMT +2. Ahora son las 11:08:35.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi