Ver Mensaje Individual
  #13  
Antiguo 09-11-2010
Avatar de chino150
chino150 chino150 is offline
Miembro
 
Registrado: dic 2007
Posts: 86
Reputación: 17
chino150 Va por buen camino
Esto es lo que e logrado gracias a su ayuda

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
 i,cont,numVoc, numConso :Integer;
 const
 Alfabeto=['A'..'Z'];
 Vocales=['A','E','I','O','U','Á','É','Í','Ó','Ú'];
 Consonantes=Alfabeto-Vocales;
begin
NumVoc := 0;
NumConso := 0;
for i:= 0 to Length(Memo1.Text) - 1 do begin
 if UpCase(Memo1.Text[i]) in Vocales then
 Inc(NumVoc);
 if UpCase(Memo1.Text[i]) in Consonantes then
  Inc(NumConso);
Cont := Length( Memo1.Text);
 ShowMessage(' letras: '+(IntToStr(Cont)) + ' Vocales: '  + (IntToStr(NumVoc))  +'Consonantes:  '+ (IntToStr(NumConso))); ;
  end;
    end;
end.
pero debo de darle varios click al boton del mensaje para llegar al resultado final.
Responder Con Cita